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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Matas
Advocate II
Advocate II

Comparing Two measure with each other

Hi guys,

 

Can someone help me to my issue. I have two DAX measures that returns the value from a table.

OCR Validated Ratio =
var T1 = VALUES(Table[DOCID])
var T2 = ADDCOLUMNS(T1, "@NumOfBlanks", SUMX(FILTER(CALCULATETABLE(Table), Table[CALL_POINT] = "VA02"),
IF (Table[VALUE] <> BLANK(),1)
)
)
var T3 = FILTER(T2, [@NumOfBlanks] <> BLANK())
RETURN COUNTROWS(T3)


and

 

OCR Extracted Ratio =
var T1 = VALUES(Table[DOCID])
var T2 = ADDCOLUMNS(T1, "@NumOfBlanks", SUMX(FILTER(CALCULATETABLE(Table), Table[CALL_POINT] = "EX02"),
IF (Table[VALUE] <> BLANK(),1)
)
)
var T3 = FILTER(T2, [@NumOfBlanks] <> BLANK())
RETURN COUNTROWS(T3)

 

I would like to output the number of rows that contain different values inside, since those measures contains ~90% of the same Values. I would like to achieve something like Return the value where OCR Extraction Value <> OCR Validation Ratio.

 

Regards,

Matas

2 REPLIES 2
amitchandak
Super User
Super User

@Matas , Not very clear

A measure like 

countrows(filter(Table, [Measure1]> [Measure2]))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

 

I have two measures mentioned above. I need to create a measure using DAX to return the countrows that Measure1 <> Measure2. 

 

The Measure1 returns the countrows of CALL_Point = "EX02" and Value <> Blank.

The Measure2 returns the countrows of CALL_POINT = "VA02" and Value <> Blank.

 

I need the third measure which would return the countrows of Measure2 where the Value <> Measure1 Value.

 

Adding an example from my database. Usually, the VALUE corresponds to the CALL_POINT, but sometimes the Value is being manually changed on the column CALL_POINT = "VA02", so it can contain a different value than "Extracted or EX02", this can be seen in Line 2 and Line 5.

Screenshot_4.png

 

Let me know if I can somehow to simplify my question even more.

 

Regards,

Matas

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.