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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Marcus2
Helper I
Helper I

Cumulative running total & view last 2 years from a single slicer selection

I would like to select my cumulative running total end date from a single slicer selection and view prior 2 years of data for comparison purposes.

Excel data:

 

DateFYValue
10/31/2022   2023     97     
11/30/2022202348
12/31/2022202356
1/31/2023202327
2/28/2023202336
3/31/2023202377
4/30/202320231
5/31/2023202321
6/30/2023202361
7/31/2023202382
8/31/2023202361
9/30/2023202386
10/31/2023202497
11/30/2023202417
12/31/2023202496
1/31/2024202447
2/29/2024202470
3/31/2024202498
4/30/2024202480
5/31/2024202487
6/30/2024202438
7/31/202420248
8/31/2024202457
9/30/2024202441
10/31/2024202546
11/30/2024202540
12/31/2024202594
1/31/2025202555
2/28/2025202583
3/31/2025202516
4/30/2025202574
5/31/2025202535
6/30/2025202533
7/31/2025202522
8/31/2025202597
9/30/2025202550

 

Marcus2_0-1739246735278.png

 

 

My bar chart funtions fine from a single slicer selection:

 

Marcus2_1-1739246889520.png

 
 
 
 
The DAX for my line chart does not terminate the cumulative running total at my slicer selection.  If I turn on the month slicer I get 3 dots on the visual... If I turn off the month slicer I get full years of data (as shown below):
 
Marcus2_0-1739248313780.png
 

 

Current Dax for Running Line Chart =
var _SelectedMonth = Max(DateTable[FYMonthNumber])
var _SelectedYear = Max('DateTable'[FiscalYear])
var _StartOfFiscalYear = Date(_SelectedYear-3,10,1)
var _EndOfFiscalYear = Date(_SelectedYear,9,30)
var _FilterDates = Filter(All('DateTable'),'DateTable'[Date] >= _StartOfFiscalYear && 'DateTable'[Date] <= _EndOfFiscalYear && 'DateTable'[FYMonthNumber] <= _SelectedMonth)
Return
Calculate(Sum(ExcelSheet[Value]), _FilterDates)
 
 

Here is my desired result (created with paint editor).  Any DAX to achieve this?

 
Marcus2_4-1739247707423.png

 

 

1 ACCEPTED SOLUTION
Marcus2
Helper I
Helper I

Thanks, I found what I needed.  It took me a while... I'm new to DAX

View solution in original post

4 REPLIES 4
Marcus2
Helper I
Helper I

Thanks, I found what I needed.  It took me a while... I'm new to DAX

BeaBF
Super User
Super User

@Marcus2 Hi! Try to disactive the relationship between calendar tables and Excel Table.

 

Can you share the pbix?

 

BBF

Only pro-level users can attach files.  When I disconnect my calendars the MonthName slicer stops controlling my bar chart... and the line chart is still doesn't funtion.

 

Marcus2_0-1739288630558.png

 

 

@Marcus2 it does not matter, it's a different stuff. Try to disactivate relationship.

 

BBF

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.