Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Create Calculated Table Showing Values From Measure if Filters Match

Hi,   I need some help.   I have 2 tables with different classifications as shown.   I created 2 cards using measures. My aim is to show the values on the cards if the classifications are the s...
  • suparnababu8's avatar
    1 year ago

    Hi Anonymous 
    It's atough requirmeent. But I'll give try

    --> First, create a calculated table that combines the two tables and checks for matching classifications 

    MatchedClassification = 
    ADDCOLUMNS(CROSSJOIN('Table1', 'Table2'),
        "Match", IF('Table1'[Classification] = 'Table2'[Classification], "Match", "No Match"))

     

    --> Create measures to display the values based on the match condition for the both cards sepeartely

    Card-1 

    Card1Value = 
    IF(HASONEVALUE('MatchedClassification'[Match]) && VALUES('MatchedClassification'[Match]) = "Match",[PercentageClassification],      "No Match")

    Card-2

    Card2value = IF( HASONEVALUE('MatchedClassifications'[Match]) && VALUES('MatchedClassifications'[Match]) = "Match",[Margin Classification],     "No Match"
    )

     

    Use the above measures and let me know if it works.