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

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

Reply
Naveen29
Helper II
Helper II

DAX help

I would like to display the data in the matrix table as follows. The measure values should display the YTD vs PYTD for country level, and loc wise it should be only YTD value.

 

How to achive this? Any suggestions.

 

 YTD vs PYYTD
Country120% vs 23%
Loc120%
Loc219%
Loc321%
Country223% vs 24%
Loc124%
Loc222%
Loc323%
8 REPLIES 8
Samarth_18
Community Champion
Community Champion

Hi @Naveen29 ,

 

Have you tried below code:-

Measure = [YTD]&" "&[PYYTD]

Note:- [YTD] and [PYYTD] represnt your measure for particular calculation.

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

this is fine. How to show only YTD in the values

Hi, @Naveen29 

If you want to display the YTD vs PYTD for country level and YTD value for loc wise, you can create measure as blow to replace the value:

 

Measure1 =
IF ( ISFILTERED ( Table1[loc] ), [YTD], [YTD] & "VS" & [PYTD] )

 

 

Best Regards,
Community Support Team _ Eason

@v-easonf-msft I tried this DAX even though it is giving or considering only one measure in the matrix table column.

Hi, @Naveen29 

Can you share your pbix file (without sensitive data) and related formulas you used?

 

Best Regards,
Community Support Team _ Eason

@Syndicate_Admin For that you dont need to create a seperate measure, you can directly drag YTD measure.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Naveen29
Helper II
Helper II

@amitchandak thanks, I know YTD and PYTD calucations. My question was more about how to display two measures in the same column depedens on the lookup value.

amitchandak
Super User
Super User

@Naveen29 , with help from a date table create a measure like

 

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

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

Top Kudoed Authors