Forum Discussion
Dynamic Columns
I have a view which has multiple measures calcuated at database level like current year count ,previous year count, current year month count, previous year same period count ,current year week count, previous week count previous year and so on. But,the problem here it is ,it showing only measure names instead of date values in matrix column headers.
I wanted replace measure names with dates. I hope its clear? How to dynamically display the column headers in Matrix report.
Currently the data appearing as below:
| Business Unit | Previous Year | Current Year | Previous Year Month | Current Year Month | Previous Year week | Current Year week |
| 1 | 12 | 15 | 2 | 2 | 1 | 1 |
| 2 | 12 | 15 | 3 | 4 | 2 | 2 |
| 3 | 13 | 14 | 1 | 5 | 1 | 3 |
Excepeted report should be like below
| Business Unit | 2019 (total YTD till system date previous year) | 2020 ( total YTD till system date) | June 2019(total MTD till system date previous year) | June 2020 (total MTD till system date current year) | 06/10/2019(WK) | 06/10/2019(WK) |
| 1 | 12 | 15 | 2 | 2 | 1 | 1 |
| 2 | 12 | 15 | 3 | 4 | 2 | 2 |
| 3 | 13 | 14 | 1 | 5 | 1 | 3 |
2 Replies
- amitchandakSuper User
Anonymous , refer if these can help
https://www.youtube.com/watch?v=yEemVBiaTuk
https://www.goodly.co.in/dynamic-column-names-power-query/
https://www.thebiccountant.com/2018/07/04/efficiently-rename-column-names-with-a-function-in-power-bi-and-power-query/
https://community.powerbi.com/t5/Desktop/Dynamic-column-name-from-its-value/td-p/189442 - v-lionel-msftCommunity Support
Hi Anonymous ,
It's impossible to achieve the idea in current version(2.81.5831.821 64-bit (May 2020)).
For more you can refer to the case.
Maybe you can submit an idea .
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.