Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ploweyj2
Frequent Visitor

Displaying rows with non-duplicate values

I am trying to create a query/table that will only display the rows that have different values for certain colums. I need to identify which cases have a different pathologic diagnosis before and after surgery along with the corresponding assesion number. Table looks something like this

 

Column 1           Column 6                 Column 7               Column 10              Column 11

Assession #  Pre-Op Diagnosis  PreOp Tumor Type Post-Op Diagnosis Post-Op Tumor Type  etc.

SMM18-001  BCC                      nodular                    BCC                        Nodular

SMM18-002  BCC                      infiltrative                 BCC                        Nodular and Superficial

 

I have searched online for an reasonable answer to solve this but have not been able to locate anything.  Any assistance would be greatly appreciated.

 

1 ACCEPTED SOLUTION

So add a custom column in Power Query. It will be something like

 

= if [column 6] = [column 10] and [column 7] = [column 11] then “Same” else “not same”

 

then filter the new column. 

 

Make sure you use use the custom column UI to get the right capitalisation of the column names. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

3 REPLIES 3
ploweyj2
Frequent Visitor

Columns 6 + 7 compared to 10 + 11

So add a custom column in Power Query. It will be something like

 

= if [column 6] = [column 10] and [column 7] = [column 11] then “Same” else “not same”

 

then filter the new column. 

 

Make sure you use use the custom column UI to get the right capitalisation of the column names. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.
MattAllington
Community Champion
Community Champion

Which columns?  In Power Query you can create a custom column to test if values in 2 columns are the same, and return true or false, then filteron that column. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.