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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Avia
Frequent Visitor

how to cross check values in several columns?

Hi,

Is there a way to view rows that have repeating valus Iin 8 different columns? how do I cross check them and show them as correlating?

 

Example (in 4 columns) : 

 

 

NamePH1PH2PH3PH4
A11111 55555 
B22222   
C33333   
D44444   
E55555   
F6666622222  
G77777   
H888888   
I999999   
J1212121211111  
K353535  11111
L424242   
M424242   


An ideal result will be a way to view (in new table/dashboard) :

1. row A and E (they have the same value 55555 )

2. row A and J and K (they have the same value 11111)

3.row B and (they have the same value 22222)

4. row L and M(they have the same value  424242)

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Avia,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Avia,

 

Please refer to the demo in the attachment. You can hide the measure in the Visual Level Filter.

1. Create a table.

PHs =
FILTER (
    DISTINCT (
        UNION (
            VALUES ( Table1[PH1] ),
            VALUES ( Table1[PH2] ),
            VALUES ( Table1[PH3] ),
            VALUES ( Table1[PH4] )
        )
    ),
    ISBLANK ( [PH1] ) = FALSE ()
)

 2. Create a measure.

Measure =
VAR selected =
    VALUES ( PHs[PH] )
RETURN
    IF (
        MIN ( 'Table1'[PH1] ) IN selected
            || MIN ( 'Table1'[PH2] ) IN selected
            || MIN ( 'Table1'[PH3] ) IN selected
            || MIN ( 'Table1'[PH4] ) IN selected,
        1,
        BLANK ()
    )

how-to-cross-check-values-in-several-columns

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LivioLanzo
Solution Sage
Solution Sage

@Avia

 

This should be easy if you apply this Power Query transformation:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY9JDsAgDAP/kjOX0v3YfX8B4v/fqA3qkqoTJCyHBNk5acRIQnDj5ITSGycthCWxd9kdREq03UNkRNvDe+tjjxAF+fzB3gRREj0yQ1QB7S8QdUD7K6PZWDplaG+MkbPusfiEzZ1hLEvvPP58fwI=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Name = _t, PH1 = _t, PH2 = _t, PH3 = _t, PH4 = _t]),
    
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"PH1", Int64.Type}, {"PH2", Int64.Type}, {"PH3", Int64.Type}, {"PH4", Int64.Type}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Name"}, "Attribute", "Value")
in
    #"Unpivoted Other Columns"

and then drop the column 'Value' into the rows section of the matrix and add this measure:

 

Measure = 
IF(
    HASONEVALUE( Data[Value] ),
    IF(
        COUNTROWS( Data ) > 1,
        CONCATENATEX(
            Data,
            Data[Name],
            ", "
        )
    )
)

Capture.PNG

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.