Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following calculation in my script. It works perfectly to calculate the time difference.
If (endtime > starttime,
Interval(endtime - starttime,'m,ss'),0)
as ProcessingMinutes,
However, when I attempt to Sum or to a Total in my Table Chart I do not get close to the correct answer.
For example the total based on my filter choices looks like a very large number.(in the thousands) However, the total that is displayed using Sum(ProcessingMinutes) displays as 5.74.
I suspect it has to do with the result from the interval function and that I need to do some massaging or additional calculations on it before I can Sum it.
Thanks
Try doing this in the script... so the underlying value is not fraction, but a whole number....
If(endtime > starttime, (endtime - starttime) * 24 * 60, 0) as ProcessingMinutes,
So, 5.74 is approx. 5 3/4th days... whereas the thousands could mean minutes, right? May be try this
Interval(Sum(ProcessingMinutes), 'm,ss')
I got 8,265 minutes and 36 seconds when converted 5.74 days to minutes and seconds
That did not change the result.
Where are you using this? In a chart? have you over-ridden the default format? Make sure you are going with default so that your expression can be formatted using Interval function.
I have tried it in a regular table and also in a KPI. I don't get the correct result in either case.
I want the total to stay in the format of mm.ss and not convert to days or anything else.
I understand what you want and that is why I suggested you to use Interval() function. Is ~8265 not the right number you are looking to get Mark?
In a standard table I have no control over the Total calculation. All I can do is pick Sum. When I do that I do not get the correct number.
In the KPI I can do what you suggested. But that is also not returning the correct result.
Mark, I get that you are not getting what you are looking to get, but I think you are not letting us know what you want? I straight forwardly asked of ~8265 is the number you are looking get, but you ignored to answer that and yet again mentioned that you aren't getting what you wanted. I won't be able to help if you ignore to answer my questions and keep on repeating the same thing over and over my friend.
Let's say that I have 3 rows of data.
The processing time is 100, 150, 50 for each of those rows (This is in minutes).
I expect the total to be 300 minutes. Not something like I am seeing now which is some small fraction.
Does that help? If not, let me know what else I can tell you. I am stumped.