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

How to cycle FY running total (Oct-Sept) with end date selected

Hi, my current DAX doesn't cycle Oct-Sept.  How can I update this DAX to get my running total to cycle Oct-Sept and keep my single selection slicer end date... and keep last 3 years of data from slicer selection.  

 

My running total result: 

 

Marcus2_0-1739747018794.png

 

 

Running Total =
var _NumOfMonths = -36
var _ReferenceDate = Max('DateTable'[Date])
var _ReferencePrevDate = Max ('DateTable(2)'[Date])
var _PreviousDates =
FILTER(
DatesInPeriod('DateTable(2)'[Date],
_ReferenceDate,
_NumOfMonths,
MONTH),
'DateTable(2)'[Date] <= _ReferencePrevDate
)
var _Result =
 if( _ReferencePrevDate <= _ReferenceDate,
Calculate(
    SUMX(ExcelSheet,ExcelSheet[Value]),
    REMOVEFILTERS('DateTable'),
_PreviousDates,
USERELATIONSHIP('DateTable'[Date], 'DateTable(2)'[Date])
)
 )
Return
_Result
 
 
Desired results:
DateFYFY Running Total
10/31/2022    2023     21     
11/30/20222023110
12/31/20222023197
1/31/20232023263
2/28/20232023329
3/31/20232023422
4/30/20232023479
5/31/20232023529
6/30/20232023590
7/31/20232023617
8/31/20232023709
9/30/20232023768
10/31/2023202454
11/30/20232024108
12/31/20232024125
1/31/20242024150
2/29/20242024184
3/31/20242024195
4/30/20242024250
5/31/20242024327
6/30/20242024395
7/31/20242024457
8/31/20242024515
9/30/20242024580
10/31/2024202513
11/30/2024202565
12/31/20242025143
1/31/20252025183
2/28/20252025271
3/31/20252025297
4/30/20252025 
5/31/20252025 
6/30/20252025 
7/31/20252025 
8/31/20252025 
9/30/20252025 
1 ACCEPTED SOLUTION
Marcus2
Helper I
Helper I

Thanks, I found what I needed... 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... took me a while.  I'm new to DAX

lbendlin
Super User
Super User

You already have a Calendar table. It probably has columns for Fiscal Year etc.  Use these as filters for your running totals.

Thanks @lbendlin, have an example?  🙂

That's not how this works. Other way round.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.