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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
tksnota
Post Patron
Post Patron

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 same if not then the cards will show "No Match".

 

Thanks...tksnota

 

tksnota_0-1728932646466.png

 

1 ACCEPTED SOLUTION
suparnababu8
Solution Sage
Solution Sage

Hi @tksnota 
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.

 

View solution in original post

5 REPLIES 5
v-mengmli-msft
Community Support
Community Support

Hi @tksnota ,

 

How is the situation now? If you want to compare the two column values and display the matching values in the card, you can refer to the following method.

 

Create a new table contains all matching values.

MatchTable = INTERSECT(ALL('Table'[Column1]),ALL('Table (2)'[Column1]))

Create a measure shows all matching values on a card.

Measure = IF(ISEMPTY('MatchTable'),"NoMatch",CONCATENATEX(MatchTable,MatchTable[Column1]&" "))

vmengmlimsft_0-1729220505941.png

 

 

 

 

Best regards,

Mengmeng Li

 

suparnababu8
Solution Sage
Solution Sage

Hi @tksnota 
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.

 

 

Hi,

 

Do you mean append 2 tables then take out the duplicats?

 

Thanks...tksnota

 

tksnota_0-1728980744984.png

 

yes

lbendlin
Super User
Super User

Create Calculated Table Showing Values From Measure

That's not something you can meaningfully do in Power BI.

 

What are you trying to achieve?

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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