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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
scorrera
Regular Visitor

DAX Formula Help

Hello,

 

I am compare last years actual spend to this years actual spend. So I'd like to take FY24 - FY23. I was able to accomplish something similiar by using this DAX:

 

FY24 Actual vs. FY24 Budget =
VAR ActualAmount = SUM('FY24 Trial Balances'[Actual Spend])
VAR BudgetAmount = SUM('FY24 Budget'[Budget])
RETURN ActualAmount - BudgetAmount
 
This compares FY24 actual spend to the budgeted amount for FY24. The problem I run into when I do this for FY24 - FY23 is an issue with dates. I currentl doing this:
 
FY24 vs. FY23 =
VAR ActualAmount = SUM('FY24 Trial Balances'[Actual Spend])
VAR ActualAmount23 = SUM('FY23 Trial Balances'[Actual Spend])
RETURN ActualAmount - ActualAmount23
 
But what I return if I look at a table visual is something like this:
scorrera_0-1713228382604.png

 

What I actually want is take the Septmeber 2023, which is FY24, and subtract Septmber 2022, which is FY23. So I'd want 4-5 which would result in -1. Again showing that actual spend in FY24 is less than was actual spend in FY23.

 

Anything helps and thanks in advance!!!

 

Steve

 
 
1 ACCEPTED SOLUTION
ChiragGarg2512
Super User
Super User

Try removing the year column from the table visual. The year column breaks the months into two parts, i.e., in Sept 2022 the FY24 is 0, and Sept 2023 FY23 is blank.

 

View solution in original post

2 REPLIES 2
scorrera
Regular Visitor

Thank you! I should have thought of that lol. 

ChiragGarg2512
Super User
Super User

Try removing the year column from the table visual. The year column breaks the months into two parts, i.e., in Sept 2022 the FY24 is 0, and Sept 2023 FY23 is blank.

 

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors