Forum Discussion
Haroldhngn
4 months agoAdvocate I
Enable Dynamic Column Headers in Matrix Visual (Context-Aware Labels)
Hello Power BI Team, I would like to suggest a new feature for the Matrix visual in Power BI: the ability to use dynamic column headers that reflect the current context, such as displaying actual mo...
v-kpoloju-msft
4 months agoCommunity Support
Hi Haroldhngn,
Thank you for reaching out to the Microsoft Fabric Community Forum. Also, thanks to Poojara_D12, lbendlin, for those inputs on this thread.
Has your issue been resolved? If the response provided by the community member Poojara_D12, lbendlin, addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.
Haroldhngn
4 months agoAdvocate I
Use fixed by "selected and switch" function to replace hardcode Prev. and Curr. by selected value of previous month and current month.
- Haroldhngn4 months agoAdvocate IDynamicShortNameLatestMth =VAR CurrIndex = CALCULATE(MAX(Dates[DateIndex]), ALL(Dates))VAR CurrMonth =CALCULATE(MAX(Dates[Mth]),FILTER(ALL(Dates), Dates[DateIndex] = CurrIndex))VAR PrevMonth =CALCULATE(MAX(Dates[Mth]),FILTER(ALL(Dates), Dates[DateIndex] = CurrIndex - 1))RETURNSWITCH(TRUE(),StaticMeasureMapping[ShortName] = "Curr.", CurrMonth,StaticMeasureMapping[ShortName] = "Prev.", PrevMonth,StaticMeasureMapping[ShortName])