Forum Discussion

tulasi_pbi1988's avatar
4 years ago

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)

 

 

Thank You.

3 Replies

  • aj1973's avatar
    aj1973
    Icon for Community Champion rankCommunity 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?

  • Anonymous's avatar
    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