Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I wonder if someone can help me.
I have a table of student information in Power query with the following layout:
Year Group | Subject Code |
10 | Ss |
11 | Ss |
12 | Ss |
13 | Ss |
11 | Pe |
12 | Ss |
13 | Ss |
10 | Pe |
I would like to change the Ss values in the "Student Group" column to Pe BUT only if the Year group is 12 or 13. I have spent quite a while trying to find a solution (ideally a single step) but I haven't been successful.
The ideal outcome would be (based on the above data) - i.e. only the bold values have been changed.
Year Group | Subject Code |
10 | Ss |
11 | Ss |
12 | Pe |
13 | Pe |
11 | Pe |
12 | Pe |
13 | Pe |
10 | Pe |
I would really appreciate it if anyone had any ideas and could help me out.
Thanks so much,
Ian
Solved! Go to Solution.
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!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
48 | |
19 | |
13 | |
11 |