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

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

Reply
Anonymous
Not applicable

Calculate % of matching text values

Hello,

I need to calculate the % of (text) values in a table that match values in a separate master data set to verify compliance.

The example below has a master classification data set with all allowed values and the table on the right has a sample table with items and classification codes some of which are correct and some not. What measure would I need to find out the % of objects in the table on the right which have an matching classification code applied?

Capture.PNG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, thank you for your reply.

I did a slightly different solution as the calculated column you suggested would not allow me to select values in different tables.

 

My solution is as follows:

Compliance Column = IF(RELATED('Master data values '[Classification Code] )='Objects Table'[Classification Code],1,0)
 
Then I added a calculated measure calculating the total of the compliant objects: 
NRM Compliant Objects = SUM('Objects Table'[Compliance Column])
 
And a final measure to give me the % ot total:
NRM Compliance = 'Objects Table'[NRM Compliant Objects]/COUNT('Objects Table'[Item Name])
 
It may not be the most efficien solution but adding in a column helped, thank you for the suggestion.

 

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Not very clear about your requirement.

If Greg_Deckler's answer slove your problem,

please feel free to mark his answer as a solution so that others may find the topic quickly.

 

If not, please share a example of your expected result.

 

Best Regards

Maggie

 

 

Greg_Deckler
Community Champion
Community Champion

 

Compliance (Column) = 
  IF('Objects Table'[Classification Code) IN 'Master data values',1,0)

Compliance (Measure) = 
  SUM('Objects Table'[Compliance (Column)] / COUNTROWS('Objects Table')

 

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi, thank you for your reply.

I did a slightly different solution as the calculated column you suggested would not allow me to select values in different tables.

 

My solution is as follows:

Compliance Column = IF(RELATED('Master data values '[Classification Code] )='Objects Table'[Classification Code],1,0)
 
Then I added a calculated measure calculating the total of the compliant objects: 
NRM Compliant Objects = SUM('Objects Table'[Compliance Column])
 
And a final measure to give me the % ot total:
NRM Compliance = 'Objects Table'[NRM Compliant Objects]/COUNT('Objects Table'[Item Name])
 
It may not be the most efficien solution but adding in a column helped, thank you for the suggestion.

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Kudoed Authors