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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DAX to get YoY comparison based on text values

HI All,
 
My current database has a Fiscal Year convertion because I need the letter "FY" to appear before the year, e.g. FY2122
 
I am trying to show a card with the comparison of the current fiscal year and the previous fiscal year, but it seems I can't filter the same table twice with different criteria with my approach (playing with letters). I also tried tried creating an automated calendar with fiscal years and months, but it doesn't work either.
 

 

 

 

AA-Avage-YoY = 
        IF(ISFILTERED(tblFTE[FiscalYear]);
            CALCULATE(AVERAGE(tblFTE[Age]);
            FILTER(tblFTE;tblFTE[FiscalYear]=tblFTE[FiscalYear])) 
            - 
            CALCULATE(AVERAGE(tblFTE[Age]);
            FILTER(tblFTE;tblFTE[FiscalYear]="FY"&MID(MAX(tblFTE[FiscalYear]);3;2)-1&RIGHT(MAX(tblFTE[FiscalYear]);2)-1)))

 

 

 

I'd appreciate any help/hint you can give me,

 

Many thanks!

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , first create a separate Date/FY Table. This FY format is sortable Create a rank on that

 

new column

Year Rank = RANKX(all('Date'),'Date'[FY],,ASC,Dense)

 

 

measures
This Year = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])))
Last Year = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])-1))

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (29)