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
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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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