Forum Discussion

JoeKulasa's avatar
JoeKulasa
Regular Visitor
5 years ago

Running total not calculating correctly

I have a the following measure:

 

 

The measure is calculating a running total of another calculated column:  

 

Problem:   The measure is calculating correctly on some lines, but seems to be adding values incorrectly.  Notice some lines should increase in "Difference" by .01, but they are increasing by .02.  Please let me know if you can help!

 

3 Replies

  • JoeKulasa , if rank is column the first one should work

     

    for the second one, index is a column, then try measure like

     

    Calculate(Sum(Table[Hour]), filter(Table, Table[Index] <= Max(Table[Index])))

     

  • JoeKulasa's avatar
    JoeKulasa
    Regular Visitor

    amitchandak 

    Thanks - Index looks like it works properly, but I need the value to reset at the start of every new shift.  This is the purpose of Rank.  See below:

     

    • Rank doesn't add correctly, but resets @ shift change, which allows the measure to reset to 0
    • Index adds correctly, but doesnt reset @ shift change

     

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi JoeKulasa ,

     

    If the [Difference] field is not summarized, is the result of the measure correct? If not, please provide a sample .pbix file(remove sensitive information).

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.