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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.