Forum Discussion

JoeKulasa's avatar
JoeKulasa
Regular Visitor
5 years ago

Running Total Not Calculating Correctly with Index

Hello,

 

Perhaps I've asked this question already but haven't worded correctly.  My calculated measure is attempting a running total based off a rank value that resets to 1 every 8 hours.

I would like the expression to show the sum of the "Difference 2" column every shift, so it would ideally show a reset of 0-8 hours run every time the rank reset to 1.  The problem I am having is that it isn't calculating correctly.  The first 3 shifts are resetting, but once the rank and shift starts to duplicate (i.e.: 1 on the next shift), it includes the sum from the prior run into the sum of the new run, meaning the sum is now including every time Rank =1.  The graph below illustrates what I mean.  The ideal graph would just show 0-8 three time per day.

 

How should I fix my formula?

 

 

 

2 Replies