Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I want to do a simple thing...
I want to compare two columns on my report. If they're the same, I want a new column that says "Yes".
(I'm trying to see if comments were entered by an employee or his supervisor).
This doesn't work:
Solved! Go to Solution.
I very much appreciate the assistance from users on this forum! I found that the solution for my situation was that I needed to do more in Power Query, rather than expecting to do column comparisons in the service.
I first did a 'merge queries', bringing the two userid fields into one merged table. From there, I added a custom column using an IF statement, populating my new column with data from the existing 'comments' column only if the two userIDs were different. If they were the same, I put "remove" into the new column, instead of the comments. Then, in a next step, I filtered rows and removed all rows containing the string "remove".
I've got to remember that Power Query is where all the action is.
Many thanks!
I very much appreciate the assistance from users on this forum! I found that the solution for my situation was that I needed to do more in Power Query, rather than expecting to do column comparisons in the service.
I first did a 'merge queries', bringing the two userid fields into one merged table. From there, I added a custom column using an IF statement, populating my new column with data from the existing 'comments' column only if the two userIDs were different. If they were the same, I put "remove" into the new column, instead of the comments. Then, in a next step, I filtered rows and removed all rows containing the string "remove".
I've got to remember that Power Query is where all the action is.
Many thanks!
I don't understand how LOOKUPVALUE would help. I already have both fields on my report. I just want to compare the two fields and, if they are the same, leave the new column blank. If they are different, populate the new column.
Measure:
isSame =
I had hopes with the MAX function! but everything is coming up "NO":
I did a merge of queries to get my two "user" fields into the same table. In the end, I actually want to put the contents of a field from another table (comments) into my new column, rather than yes/no, based on whether the two users are the same.
If those 2 are measures, try if(measure1=measure2)
Without max function.
@Anonymous
Please check if it helps Solved: The column x either doesn't exist or doesn't have ... - Microsoft Power BI Community
Regards,
Ritesh
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |