TI summary display

Post Reply
manpreet
Posts: 20
Joined: Mon May 20, 2019 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

TI summary display

Post by manpreet » Tue May 21, 2019 5:56 am

Hello Team,

We want to create TI summary Dashboard.
In this dashboard we will display Start Time, End Time, Time Taken and Remaining time of Particular TI (which is currently running in Back end).

For reference you can go on below link:
[https://www.youtube.com/watch?v=_u6b4u2R5_Q&t=350s]

Can any body help in doing this? This is our urgent requirement.

Wim Gielis
MVP
Posts: 2260
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: TI summary display

Post by Wim Gielis » Tue May 21, 2019 7:53 am

Hello,

Do you have the cube, that will capture the process run details, set up ?
What dimensions do you have in that cube ?

The idea is that every process should have code near the top of the Prolog tab to capture the starting time. A variable will be perfect.
Then, in the Epilog tab, you record the ending time.
You use CellPutN in the cube to store those values.
Use a consolidation or a simple rule to calculate the difference of start and end time. Or do a CellPutN of the difference of both times.
You can use the TM1User function to capture that information too. If a chore is running the process then the user can start with R*
In the event of errors you might not reach the end of the Epilog tab, so therefore you might also want to do a CellPutN or CellPutS earlier on in the process.

The summary display is then an active form or slice or TM1 websheet or PAX report, or whatever. It will use the data in the cube.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

Emixam
Posts: 39
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: TM1 10.2
Excel Version: 2016

Re: TI summary display

Post by Emixam » Tue May 21, 2019 8:23 pm

Hi,

Here's my suggestion, feel free to use it !

First step, create a cube to capture the process run details. I have a cube called zProcessControl with the following dimensions:
  • }Processes
    zProcessControl
    measure_zProcessControl
And then, copy-paste the following code.

Prolog:

Code: Select all

#==================================================
# Process log - Prolog
#==================================================

sProcessName = GetProcessName;
sProcessCube = 'zProcessControl';

nTimeStart = NOW;
sDateStart = TIMST(nTimeStart, '\Y \M \d - \h:\i:\s');
sUser = TM1User();
If( DimIx( '}Clients', sUser ) = 0 );
   sUser = 'CHORE';
Else;
  sUser = AttrS( '}Clients', sUser, '}TM1_DefaultDisplayValue' );
EndIf;

CellPutS (sDateStart, sProcessCube, sProcessName, 'Start Time', 'String');
CellPutS (sUser, sProcessCube, sProcessName, 'User', 'String');
Epilog:

Code: Select all

#==================================================
# Process log - Epilog
#==================================================

nTimeEnd = NOW;
sDateEnd = TIMST(nTimeEnd, '\Y \M \d - \h:\i:\s');

nElapsedSeconds = ROUND ((NOW - nTimeStart) / 0.000011574074074074);
sElpasedSeconds = NumberToString( nElapsedSeconds) | ' seconds';

CellPutS (sDateEnd, sProcessCube, sProcessName, 'End Time', 'String');
CellPutS (sElpasedSeconds , sProcessCube, sProcessName, 'Duration', 'String');


You can modify the ElapsedSeconds code to display whatever you want.
Let me know if it's what you are looking for.
Cheers !

manpreet
Posts: 20
Joined: Mon May 20, 2019 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TI summary display

Post by manpreet » Mon May 27, 2019 5:09 am

thanks everyone,

But what i need is that whenever the user on the web interface clicks on the action button to run a ti it should get the remaining time.

For example if my TI takes 10 mins and the user runs it after 2-3 mins the An error has occurred is shown while the TI runs in background and the user get logged out of it. so to tackle this i need a progress bar or something like timer which will help the user not to get logged out of the system plus he will also get the time he has to wait before clicking on another button.

i had already build a cube to capture the start time, end time and elapsed time.

but unable to create a timer.

User avatar
Steve Rowe
Site Admin
Posts: 1963
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: 10.2.2., PAW
Excel Version: Nearly all of them

Re: TI summary display

Post by Steve Rowe » Tue May 28, 2019 7:35 am

There are two issues with what you are after that mean I don't think it can be achieved without getting into the RestAPI and building your own functionality.

1. Once a user launches a TI the client session is locked there is no method to interrupt it to provide feedback on the state of the running TI.
2. There's no method for establishing the expected runtime of a TI unless you just use the prior run time information.

manpreet
Posts: 20
Joined: Mon May 20, 2019 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TI summary display

Post by manpreet » Tue May 28, 2019 10:12 am

But Steve

In the video link i have provided they have done it i don't know how using RestAPI or VBA or through any other function.

tomok
MVP
Posts: 2631
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: TI summary display

Post by tomok » Tue May 28, 2019 10:31 am

manpreet wrote:
Tue May 28, 2019 10:12 am
But Steve

In the video link i have provided they have done it i don't know how using RestAPI or VBA or through any other function.
I watched the video and they did not present a running progress bar or any other visual timer. What I saw is a cell that showed the running time of a TI process that presented the ending value of how long it took to run a process, not live updates while the process is running.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

manpreet
Posts: 20
Joined: Mon May 20, 2019 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TI summary display

Post by manpreet » Tue May 28, 2019 10:43 am

Tomok,

they have shown the remaining time of the TI in that video which they are refreshing using a refresh button to refresh the data.

User avatar
Steve Rowe
Site Admin
Posts: 1963
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: 10.2.2., PAW
Excel Version: Nearly all of them

Re: TI summary display

Post by Steve Rowe » Tue May 28, 2019 12:25 pm

There is something around 7:20 that implies a known remaining run time in the video but tbh I don't believe it is possible to know this with accuracy. It's probably derived from assumptions about how much work has been requested or some other estimate. Maybe the TI is reaching out to third party for the stats work and that is returning an estimate of run time.

Happy to be wrong...manpreet the only way you can get to the bottom of this is to reach out to the makers of the video.

User avatar
gtonkin
MVP
Posts: 737
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: PAL 2.0.3
Excel Version: 2016 64-bit
Location: JHB, South Africa
Contact:

Re: TI summary display

Post by gtonkin » Tue May 28, 2019 2:59 pm

My interpretation of the video was that it was running iterations and based on previous iterations was estimating remaining time - not a real-time estimate.

manpreet
Posts: 20
Joined: Mon May 20, 2019 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TI summary display

Post by manpreet » Thu May 30, 2019 11:33 am

Hey Team,

Is there any way to find the start time of the TI on the time i click run button.
Means if i run the TI At 4pm it should be uploaded in my cube in start time at 4pm not after completing the whole TI process.

Example:- if I run a TI @4 and it takes 10 mins then in my cube were i store the start time is refreshed when the whole process is completed i want it store on click of my run.

TO get start time i had written NOW in Prolog tab of TI.

Thanks in advance......

manpreet
Posts: 20
Joined: Mon May 20, 2019 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TI summary display

Post by manpreet » Thu May 30, 2019 11:47 am

Hey Team,
the Logic I am applying to get the user the remaining time

*****last time the process took this much time******
i have start time === 1 pm
i have end time ==== 1.10 pm
time taken ==== 10 mins

now when i will run the Ti again i know a estimated time of 10 mins

now what i want actually is the start time to get updated on the click of the run button
so now if the current time is 2 pm and i clicked the run button to process the Ti then i will add the time taken last time

so now what i have the estimated end time 2+.10 = 2.10 pm

now to calculate the remaining time i will subtract the estimated end time with the current time = 2.10-2.1 = 9 mins remaining and as i am using now for current time on every refresh my remaining time will updated.

Now i am only unable to get the start time on the time i click the run button.

Thanks......

tomok
MVP
Posts: 2631
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: TI summary display

Post by tomok » Thu May 30, 2019 2:39 pm

manpreet wrote:
Thu May 30, 2019 11:47 am
Now i am only unable to get the start time on the time i click the run button.
You could always pass the start time as a parameter of the TI process that pulls from a cell in Excel with the NOW function but why bother when you can get the start time in the Prolog of the process like you are currently doing. I doubt the difference between the two would be more than a few milliseconds.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

PlanningDev
Community Contributor
Posts: 338
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Re: TI summary display

Post by PlanningDev » Thu May 30, 2019 5:28 pm

Depending on what your TI is doing you could fire your TI process off using TM1RunTi.exe which would release the user session back allowing the person to continue working. In your TI that is processing you could add similar logic to the below. On your summary screen someone would just have to refresh in order to see the update (since there is no auto refresh in TM1Web out of the box).

Prolog
Get estimated run time from cube that contains last run time length
Set start time of process in tracking cube
Set estimated run time
Rule calculated estimated end time (Start time + estimated run Time)

Metadata/Data
Modify estimated remaining time = Run Time - (Current Time - Start Time)

Epilog
True up end time

manpreet
Posts: 20
Joined: Mon May 20, 2019 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TI summary display

Post by manpreet » Fri May 31, 2019 5:00 am

Hey PlanningDev,

Can you please elaborate the TM1RunTI.exe part i didn't understand it clearly.

I Have never used TM1RunTI.exe i only know the concept of it that with the help of it i can run my TI in multiple Threads.

Thanks
Manpreet

Post Reply