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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Comparing two tables for Non Matched and Matched Rows to show in One Visual.

Hi,

 

I have a scenario to show matching and non-matching rows in the Pivot table.

 

Currently showing in two pivots as used Measure to filter.

 

Sample data are shown in the below image.

 

Flag(measure) = if(NOT(CONTAINS(Tables1,Table1[PRID],SELECTEDVALUE(Table2[PRID]))),1)

 

tulasi_pbi1988_0-1634716771068.png

 

Thank You.

3 REPLIES 3
Anonymous
Not applicable

HI @tulasi_pbi1988,

I'd like to suggest you add a calculated column to 'table 1' to show the tag based on 'table 2' records.

Column =
IF (
    COUNTROWS (
        FILTER (
            Table2,
            [Country] = EARLIER ( Table1[Country] )
                && [Prid] = EARLIER ( Table1[PRID] )
        )
    ) > 0,
    "Matched",
    "No Matched"
)

EARLIER vs EARLIEST in DAX - Excelerator BI

Regards,

Xiaoxin Sheng

aj1973
Community Champion
Community Champion

Hi @tulasi_pbi1988 

I see your thread, and going back to your questions:

If the relationship is Many to Many means? Make no difference but it is better to have 1 to many relationship

I have the same scenario to do, but I have Many to Many relationship. Where is the issue??

Do you have anything like this, please? Did you download my Pbix sample from the other Thread?

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

VahidDM
Super User
Super User

Hi @tulasi_pbi1988 

 

Please see this link:

https://radacad.com/combining-tables-in-power-bi-union-except-and-intersect-in-dax

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.