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
Anonymous
Not applicable

Need help with getting cumulative total

Hi all,

 

The table i am working with only the first four columns. How do I go about filtering the table by "Department", "Team", "Quarter" and getting the cumulative total in a new column as shown below.

 

Department-----Team-----Quarter-----Items sold-----Cumulative total of items sold
Department ATeam 1Q13030
Department ATeam 1Q22252
Department ATeam 1Q31062
Department ATeam 1Q41375
Department ATeam 2Q11010
Department ATeam 2Q21222
Department ATeam 2Q3628
Department ATeam 2Q4230
Department BTeam 3Q111
Department BTeam 3Q234

 

Thank you,

chq

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , if you need a new column

 

sumx(filter( Table, [department] = earlier([department]) && [Team] = earlier([Team])  && [Quarter] <= earlier([Quarter]) ), [item Sold] )

 

Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s

 

 

or you can measure using new window function

 

Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

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.