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.
I want to replace null with 0 for different columns if the Header has a specific part of a string as here "costs". For example for the headers with: costs 2020 xyz, costs 2021 zy, costs 1996 hscdf
= Table.ReplaceValue(#"Entfernte Spalten",null,0,Replacer.ReplaceValue,{"costs 2020 "})
= Table.ReplaceValue(#"Entfernte Spalten",null,0,Replacer.ReplaceValue,{"costs 2021"})
= Table.ReplaceValue(#"Entfernte Spalten",null,0,Replacer.ReplaceValue,{"costs 1996 hscdf})
As I have quite a lot of these columns to change manually I want to change the null with 0 for all columns if the header contains "costs".
Thank you for your help in advance!
Solved! Go to Solution.
I found a solution myself
= Table.ReplaceValue(#"Entfernte Spalten",null,0,Replacer.ReplaceValue,List.Select(Table.ColumnNames(#"Entfernte Spalten"), each Text.Contains(_, "one-time costs")))
I found a solution myself
= Table.ReplaceValue(#"Entfernte Spalten",null,0,Replacer.ReplaceValue,List.Select(Table.ColumnNames(#"Entfernte Spalten"), each Text.Contains(_, "one-time costs")))