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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Count different comparison between a Measure and a Column

Hello,
I am trying to compare the output from a measure("CODE MEASURE") with a column value("CODE COLUMN").

code.PNG

I want to calculate the mismatch of each code on a daily basis, example: If "CODE MEASURE" has a value A but got output in "CODE COLUMN" as B, then count as 1. In the final result("COUNT RESULT"), I want the count of mismatch between each code on a daily basis.

Thanks for any help provided.

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create measures as below.

Count = 
IF ( MAX ( 'Table'[Code column] ) <> [Code measure], 1, 0 )
Count result = 
CALCULATE (
    SUMX ( 'Table', [Count] ),
    ALLEXCEPT ( 'Table', 'Table'[Code column] )
)

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thank you for your reply.
The below image shows the output which I got from the measure which you sent. But in the Code Measure many values are not shown, like "A","D","M"
CODE1.PNG
code.PNG
My code measure has values - A,B,C,D,M,S&P
Similarly my code column has values -  A,B,C,D,M,S&P.
1)I want the logic as if my code measure was a "A", then how many counts it was mismatched as B, similarly how many counts it was mismatched as C and so on.
2)Next what if my code measure was a "B", then how many counts it was mismatched as A, similarly how many counts it was mismatched as C and so on.
The same above logic I want to apply for each value in code measure.

Thank you in advance for your help.

 

Hi @Anonymous ,

 

Kindly share your sample data to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hello, 
I am attaching the powerbi sample file in the below google drive link. If you need any more information kindly do let me know.
https://drive.google.com/file/d/1OtJr8v834Rg78J2OfAoG9_h6rlG5uQz7/view?usp=sharing 

Thanks for your help.

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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