Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JoeKulasa
Regular Visitor

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.

JoeKulasa_0-1618501733657.png

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.

JoeKulasa_1-1618501805562.png

 

How should I fix my formula?

 

 

 

2 REPLIES 2
v-yuaj-msft
Community Support
Community Support

Hi @JoeKulasa ,

 

Could you please share some sample data and the expected result to have a clear understanding of your question? I can do some tests for you.

You can save your files in some cloud sharing platforms and share the link here.

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,

Yuna

JoeKulasa
Regular Visitor

Forgot to include a picture of my data with the "Rank" column:

JoeKulasa_0-1618502973164.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.