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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.