March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I hope to replace values for all columns no matter how many new columns will be added in the future?
Currently I do it ranging particular columns but will come more new columns over time.
Solved! Go to Solution.
Hi @jeongkim - you can modify your Power Query (M code) script to dynamically apply the replacement logic to every column in the table.
slight adjustment as per the mcode change,
#"Replaced Value" = Table.ReplaceValue(
#"Filtered Rows",
null,
0,
Replacer.ReplaceValue,
Table.ColumnNames(#"Filtered Rows")
)
Locate the step where you are replacing values.
Replace your existing hardcoded column names with the dynamic method shown above.
Save and apply the changes.
Proud to be a Super User! | |
Hi @jeongkim - you can modify your Power Query (M code) script to dynamically apply the replacement logic to every column in the table.
slight adjustment as per the mcode change,
#"Replaced Value" = Table.ReplaceValue(
#"Filtered Rows",
null,
0,
Replacer.ReplaceValue,
Table.ColumnNames(#"Filtered Rows")
)
Locate the step where you are replacing values.
Replace your existing hardcoded column names with the dynamic method shown above.
Save and apply the changes.
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
83 | |
77 | |
66 | |
58 |
User | Count |
---|---|
132 | |
113 | |
98 | |
78 | |
78 |