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
DonRSA
Frequent Visitor

Compare Current and Previous Financial

Hi 

I have  a dax that compare current  Financial Year and Previous financial year.

E.g if i want to compare one month to another, i have a problem when my current month is not a full month, maybe until the 5th of may,now i want to compare it with another previous month (same month which is may on the previous FY) but it has to calculate sales until the 10th.  I have two calenders(First Calender and Comparison Date)

This is what i have sofar:

 

My fincial year starts July and end June

My Measures:

1st. I'ts financial year is FY23,i do have a column for that
Sales = SUM('TableA'[Sales Value])
 
2nd:I'ts financial year is FY22,i do have a column for that
Compare =
Var SelectedMOnth = SELECTEDVALUE('Comparison Date'[Fiscal Month Name])
Var MonthSales =CALCULATE([Sales],All('First Calender'),
USERELATIONSHIP('Comparison Date'[Date] ,'First Calender'[Date]),'Comparison Date'[Fiscal Month Name]=SelectedMOnth)
return MonthSales
 
The Sale measure it's from July until May 05
The Compare Measure is adding everything until June,and i want it to compare until 05.
 
Please see Picture Below, How do i Solve this?
DonRSA_0-1683287596847.png

 

 
1 REPLY 1
DonRSA
Frequent Visitor

Hi,anyone who can help please

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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