Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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 | |
| Country1 | 20% vs 23% |
| Loc1 | 20% |
| Loc2 | 19% |
| Loc3 | 21% |
| Country2 | 23% vs 24% |
| Loc1 | 24% |
| Loc2 | 22% |
| Loc3 | 23% |
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
@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.
@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