In Power BI’s Import Mode, you can dynamically change column names on visuals. To achieve this, follow the steps below:
Follow these steps in order to change column name dynamically
- Assign an index to each row using the “Index” column under Power Query Editor.
- After that, create a duplicate dataset by unpivoting the columns.
- Create a relationship between both datasets based on the “Index” column.
Supports only Import mode; it will not work with Direct Query Mode. The reason is that when you transform the columns, it switches your dataset to Import Mode.
Additionally, the Index column is not supported in Direct Query Mode.
Solution With Direct Query:
If you want to achieve this within DirectQuery, then you have to prepare your datasets in the same way as you would for Import Mode final datasets
Watch video for step by step practical:
Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.