Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi, I would like to ask, in PQ, is there any way I could replace the value based on columns' name?
ID | Group | Cost 1 | Cost 2 | Price 1 | Price 2 |
1 | A | - | 0.8 | - | -0.11 |
2 | B | 0.4 | - | - | 0.23 |
3 | - | 0.5 | - | 0.6 | - |
4 | C | - | 0.4 | 0.1 | - |
5 | D | 0.6 | 0.2 | 0.54 | 0.57 |
Like in this case, I would like to replace "-" with 0, but only apply to columns' name started with "Cost" & "Price"
Appreciated if any solutions.
Solved! Go to Solution.
Hi @ngct1112
Table.ReplaceValue(yourPreviousStep,"-",0,Replacer.ReplaceValue, List.Select( Table.ColumnNames( yourPreviousStep), each Text.Contains(_,"Cost") or Text.Contains(_,"Price")))
Hi @ngct1112
Table.ReplaceValue(yourPreviousStep,"-",0,Replacer.ReplaceValue, List.Select( Table.ColumnNames( yourPreviousStep), each Text.Contains(_,"Cost") or Text.Contains(_,"Price")))