Forum Discussion

Tevon713's avatar
Tevon713
Helper V
3 years ago

Count if statement in Power BI

Hi all,  

 

I'm trying understand how "count if" work in power bi logic. Is it count rows or counta?

Let say for instance I have the following in excel, basically look at rows and returning 1 if found not 0... unique or distinct count in for that list. Afterward look at same data list in column and match to another dataset and it too does the same return 1 or 0.

 

How would I translate the following in DAX? Create a calc columns to store both statements?

 

IF(COUNTIF($A$4:A4,A4)=1,1," ")

IFERROR(IF(XLOOKUP(VALUE(A4),VALUE(DATA'!$C$2:$C$100))=VALUE(A4),1,0),"")