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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Tevon713
Helper IV
Helper IV

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),"")

1 REPLY 1
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @Tevon713 - You should use CALCULATE - DAX Guide. function to filter the COUNTROWS or COUNTA functions.  Please watch the videos in the following to understand difference between these expressions:

COUNTA - DAX Guide

COUNTROWS - DAX Guide


Many thanks

Daryl

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.

Top Solution Authors