Forum Discussion

Pfin's avatar
Pfin
Frequent Visitor
2 years ago
Solved

Power BI - Dynamically Change Column Name

I'm trying to take the data from Tables 1 & 2 to create a report based on selected Make/Model.  The challenge is that each Make/Model has 3 fields for general value adjustments. 

 

In order to keep it consistent, I just call them ValueAdj1, ValueAdj2, and ValueAdj3.  Using Table 2 which provides the actual name of the value adj by Make/Model/ValueAdj, I need to create a report and rename the ValueAdj 1-3 to their ACTUAL name.  The first green report below shows The Toyota Camry.  Then when you change the Make/Model to Nissan Altima, the 3 column headers are renamed to their corresponding ValueAdj header names per the reference table for Nissan Altima.

 

I've researched this in detail and seen multiple possibilities including variables but I still get stuck.  

 

Any ideas?

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pfin ,

     

    This seems to be an unsupported feature. What I can think of is that the table originally had these columns, and then filtered by slicer to filter the table data.

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi   Pfin 

    Power BI doesn't allow dynamic renaming of columns in visuals, unlike Excel. A workaround involves creating a table with all potential column name and value combinations and utilizing a slicer to filter the displayed columns based on user preferences. This approach provides a flexible solution, though it's important to note that there isn't a universal fix for this issue. I've discussed this in detail in a vlog.

     

    https://www.youtube.com/shorts/CHEneTrZav0 

    https://www.youtube.com/watch?v=8U88ZRMsCI8&ab_channel=PowerBITambayan

     

    The link to a sample pbix is posted on the video description.