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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Matas
Advocate II
Advocate II

DAX Comparing Columns and Vs

Hi,

 

I would like to request help regards my DAX measure that I cannot figure out. I have a table with columns VALUE and CALL_Point (which contain "VA02" and "EX02" values). I need to return the count of <> BLANK() from table[VALUE] where Table[CALL_POINT] = "VA02" and is not equal <> Table[VALUE] where Table[CALL_POINT] = "EX02".
Since the CALL_POINT "EX02" and "VA02" can contain the same value, which is fine, I need the ones that differ.

 

This is my current DAX measure, which returns the count of Table[VALUE] for CALL_POINT = "VA02" which does not contains BLANK values. 

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)
 


Hopefully anyone can spend their time on helping me. Thanks in advance!

Regards,

Matas

 

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please try the below measure.

 

OCR Validated Ratio =
VAR T1 =
    VALUES ( Table[DOCID] )
VAR T2 =
    ADDCOLUMNS (
        T1,
        "@NumOfBlanks",
            CALCULATE (
                COUNTROWS (
                    FILTER ( Table, Table[CALL_POINT] = "VA02" && Table[VALUE] <> BLANK () )
                )
            )
    )
VAR T3 =
    FILTER ( T2, [@NumOfBlanks] <> BLANK () )
RETURN
    COUNTROWS ( T3 )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi @Jihwan_Kim 

 

My question was, how can I optimize the current DAX measure so that the end result would compare CALL_POINT columns "VA02" and "EX02" values, that if for column CALL_POINT "VA02" and "EX02" value is not blank and not the same from the VALUE column, return the result. I have two columns.

 

For example:

Matas_0-1656167332869.png

From this example, the function should not return anything, since the EX_02 and VA_02 values are the same, but if it would be different then I should get a corresponding result. Hopefully, this made it easier to understand the issue I am facing.

 

Regards,

Matas

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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