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
revansh
Helper IV
Helper IV

RUNNING SUM OF A MEASURE

Hi All,

 

I have a requirement to blindly calculate the running sum of a measure. Given below is my sample data.

Column 1,2,3 is my source data.

Colum 4 = Calculated measure

Column 5 = running total

Column 6 = expected running total (how to achive this)

 

PLease help. thanks

 

DateA Value B ValueMEASURE = IF SUM(B)=0 THEN 0 ELSE SUM(A)/SUM(B)ACTUAL RUNNING SUM OF COLUMN DREQ RUNNING SUM OF D
1-Feb105222
2-Feb2010224
3-Feb150034
4-Feb401048.58
4 REPLIES 4
v-lionel-msft
Community Support
Community Support

Hi @revansh ,

 

Could you give me the mathematical formula for these two columns? I do n’t know how they are calculated, I can help you convert to DAX formula.

f2.PNG

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.

 

amitchandak
Super User
Super User

Running total will need some incremental context. Like a date , id, etc. to use <=. What we can have here.

@amitchandak  i have edited my example dataset.

 

Thanks

Have a date table and try like

Cumm Sum = CALCULATE(SUM(Table[B]),filter(date,date[date] <=max(date[date])))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin

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.