Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This sounded simple to start with I thought just use interval to give me the times but no. On the spreadsheet is the data I'm getting I need to calculate the time between status 4-1 that will give me the up-time and the time between status 1-4 will give the time stopped and the time between 2-4 will give the time in manual mode.
I've tried the above function but with no luck what would be the best way to do this or do i pass it back has its not possible with data in the format it is in ?
Are you looking to get 8 minutes and 23 seconds on the row where Machine PK is 433?
Aggr(
Interval(Only({<InAuto = {'True'}>} [Machine Time]) - Above(Only({<InAuto = {'True'}>} [Machine Time])), 'hh:mm:ss')
, [Machine PK])
Are you looking to do this on the front end or back end of the app? If you tried above() in the back end, it wouldn't work because Above() is only available on the front end of the app (in a chart).
Also, if you did try it in a chart, what were your dimensions? What was your expression?
Looking at this from the front end I've tried this :
Sum({<InAuto={'True'}>}Aggr(Interval([Machine Time]-Above(total[Machine Time],1),'hh:mm:ss'),[Machine PK]))
its the same as looking status 4 but its wrong because it will only calculate between status 4 and status 4 does that make sense ?
Will attach the app Can not get the qvd to attach
Are you looking to get 8 minutes and 23 seconds on the row where Machine PK is 433?
Aggr(
Interval(Only({<InAuto = {'True'}>} [Machine Time]) - Above(Only({<InAuto = {'True'}>} [Machine Time])), 'hh:mm:ss')
, [Machine PK])
Thank you that looks correct will try it and report back : )
Made a little change
Sum(Aggr( Interval(Only({<Status_code = {1}>} [Machine Time]) - Above(Only({<Status_code = {4}>} [Machine Time])), 'hh:mm:ss') , [Machine PK]))
and then changed the status codes to get the difference times with each status