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.
Hello,
Is it possible to swap values in two columns for the same row? For example; Row 10-Column A and Row 10-Column B need to have the values swapped.
NOTE: All other values in these columns are correct. For some reason, these two particular values must have been entered incorrectly in the source data.
Any help would be appreciated
Solved! Go to Solution.
Hi @Anonymous
First Add an Index Column from the Query Editor to identify row number
then you can use this Custom Column to get revised Column Values with swapped rows
if [Index]=10 then [Col B] else [Col A])
Hi @Anonymous
First Add an Index Column from the Query Editor to identify row number
then you can use this Custom Column to get revised Column Values with swapped rows
if [Index]=10 then [Col B] else [Col A])
@Anonymous
Please see Query Editor in attached file
Thanks Zubair. That worked very nicely. I actually had the ID already inserted but wasn't connecting the dots enough to think of a conditional column like that. For the record, I actually had a couple of incorrect values to change. I also added a second column to complete the swap. I've included some notes in case someone has a similar problem in the future.
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 |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |