Forum Discussion
Matrix column names based on slicer selection
Hi ,
I want to display column name to be based on slicer selection period, i have created two measure using min and max.
Want to change the column header name to be changed as "202101" in place of "Previous period" and "202105" in place of "Current period".
Hi Mani_ms
It is not supported to change measure names dynamically because Power BI uses a definite name to refer to a measure.
A workaround would be: insert a blank button, set its Button Text with a measure, turn off button's outline, drag this button to cover column header of matrix, group matrix and button.
Text measure is like below. It should be of Text type, otherwise it cannot be selected for the conditional Button Text setting.
Max Value = CONVERT(MAX('Table'[YearMonth]),STRING)Reference: Use grouping in Power BI Desktop
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
3 Replies
- amitchandakSuper User
Mani_ms , I doubt you can have a dynamic measure name. If needed you can have column year on column of matrix
- Mani_msHelper I
how to add dynamic measure name?
- v-jingzhangCommunity Support
Hi Mani_ms
It is not supported to change measure names dynamically because Power BI uses a definite name to refer to a measure.
A workaround would be: insert a blank button, set its Button Text with a measure, turn off button's outline, drag this button to cover column header of matrix, group matrix and button.
Text measure is like below. It should be of Text type, otherwise it cannot be selected for the conditional Button Text setting.
Max Value = CONVERT(MAX('Table'[YearMonth]),STRING)Reference: Use grouping in Power BI Desktop
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.