Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi guys,
i have a recurring problem. I have a table in Power Query and a lot of transformations on that table.
Now sometimes it happens that a column name changes in the original table or that i need to change a column name for better understanding.
Now all subsequent steps where the column name is refferred to have to be updated for the new name. Is there an efficient way to do it for alle subsqeuent steps at once?
Thanks guys
Solved! Go to Solution.
Hello @Anonymous
you can copy paste the code into some editor and replacing your column-references at once.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @Anonymous
you can copy paste the code into some editor and replacing your column-references at once.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
@Anonymous , I'm afraid you have to manually change those hard-coded column names one by one; but a more generic reference to the name of a certain column,
Table.ColumnNames(#"Some Step"){1}
renders your M code more flexible; so when you change a column's name next time, you don't need to adjust the M code again.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
In such scenerios you can create a view in database and use the view in Power Query. So whenever the changes in table , you can change the names in View. If the Power bi desktop you need to new name then at the end of power query step you can rename.
This is how we managed in some projects.
If you donot have control on database, write sql query to extract data from table so that use alias name.