cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Abhaykumar Regular Visitor
Regular Visitor

Dynamic column name

By passing parameters and renaming using power query, I am setting the column name dynamically:

    #"Renamed Columns" = Table.RenameColumns(ModelOutput1,{{"Dimension1", Dimension1}, {"Dimension2", Dimension2}})

However visuals associated with this column name are giving error if I change the parameter value (from what was its initial value):

 

ModelError.png

 

Is there a way that I can use parameters for a column name and still have the column consumed in a visual?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Dynamic column name

No, thats not possible. 

The column name is the identifier of your column. Different name -> different column. The data model has no idea/connection to what has been done in the query editor.

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




View solution in original post

1 REPLY 1
Super User
Super User

Re: Dynamic column name

No, thats not possible. 

The column name is the identifier of your column. Different name -> different column. The data model has no idea/connection to what has been done in the query editor.

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 168 members 1,515 guests
Please welcome our newest community members: