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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Running Total Used with Slicer and 2 Tables

I have 2 tables. A date_table and a data_table. I use the date_table for a slicer and the x-axis below. I use the data_table for the bars of the bar chart below. There is a 1:* relationship between date_table[date] and data_table[countColumn]. I created a running total measure(dark blue line below) that I want to show like the red line drawn below and the slicer to work with it as well. Thanks so much for your time.

 

work22_0-1672444611786.png

Sample Data for data_table:

work22_1-1672444741681.png

The date_table is simply each day of the year in short form.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , With help from Date table,new measure

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

or

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))

 

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

 

Running Total/ Cumulative: https://www.youtube.com/watch?v=h2wsO332LUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=41

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , With help from Date table,new measure

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

or

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))

 

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

 

Running Total/ Cumulative: https://www.youtube.com/watch?v=h2wsO332LUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=41

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors