Forum Discussion
Replace values in a column based on values in a different column
- 4 years ago
I've found the solution so wanted to close this before anyone commented!!
I created a custom column:
Table.AddColumn(#"Capitalized Subject code", "Change KS5 Ss to Pe", each if [Subject Code] = "Ss" and [YearCode] >= 12 then "Pe" else [Subject Code])
"Capitalized Subject code" and "Change KS5 Ss to Pe" refer to parts of the puery to make it easier for mne to follow what I did so I can do it again if I need to!!
I've found the solution so wanted to close this before anyone commented!!
I created a custom column:
Table.AddColumn(#"Capitalized Subject code", "Change KS5 Ss to Pe", each if [Subject Code] = "Ss" and [YearCode] >= 12 then "Pe" else [Subject Code])
"Capitalized Subject code" and "Change KS5 Ss to Pe" refer to parts of the puery to make it easier for mne to follow what I did so I can do it again if I need to!!