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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Nihed
Helper III
Helper III

Need help in dax

Hello,

Please how i can change KPI selection from Year(2022) and Year N-1(2021) to YTD and YTD N-1

 

Nihed_0-1648668234099.png

these are the columns I have to use :

Nihed_1-1648668274064.png   

Nihed_2-1648668330200.png

 

 

 

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @Nihed 

 

Have you take @amitchandak 's advice? If your problem has been solved, you can mark the answer as solution to close the thread. If not,  Is your YTD a full year? please add more details and feel free to ask me.

 

Best Regards,
Community Support Team _ Janey

amitchandak
Super User
Super User

@Nihed , if you need two measures, You can try

example 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

 

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

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.