Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi there,
Could someone please tell me how I can replace values in a column with the column name.
As a simple example, I want PQ to replace every 'Nein' with the column name:
Is this doable?
Thanks.
Solved! Go to Solution.
NewStep= Table.ReplaceErrorValues(PreviousStepName,List.Transform(Table.ColumnNames(PreviousStepName),(x)=>{x,x}))
NewStep=Table.TransformColumns(PreviousStepName,List.Transform(Table.ColumnNames(PreviousStepName),each {_,(x)=>if x="Nein" then _ else x}))
Hi Daniel,
It works perfectly! Thank you!
How can I please apply your solution when I want to replace errors, instead of a specific value, with the column name?:
Looking forward to hearing back from you.
NewStep= Table.ReplaceErrorValues(PreviousStepName,List.Transform(Table.ColumnNames(PreviousStepName),(x)=>{x,x}))
Genius. Thanks very much!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
9 | |
7 | |
6 | |
6 |