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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
vincentakatoh
Helper IV
Helper IV

DAX: Exclude if Count is ZERO

Hi, 

Need help on DAX to exclude if Count= zero. Using below DAX formula.

 

1) PRT0_CFnFail = sum(Data[CountFnF]) <Sum of Count>

2) PRT1_AllDefectsFn = CALCULATE([PRT0_CFnFail],ALL(Data[FailDefectCode])) <Sum of all rows>

 

Currently the DAX in (2), list all rows even if (1) = zero.

 

Que: How can I change (2) to exclude rows when (1) equals to zero. Objective is to exclude rows if count is zero. 

 

2017-07-04 00_56_05-GPAUS 0629 - Power BI Desktop.png

 

1 ACCEPTED SOLUTION
kschaefers
Resolver I
Resolver I

You can modify your DAX formula for (2) to  be:

PRT1_AllDefectsFn = IF(ISBLANK([PRT0_CFnFail]),BLANK(),CALCULATE([PRT0_CFnFail],ALL(Data[FailDefectCode])))

View solution in original post

2 REPLIES 2
kschaefers
Resolver I
Resolver I

You can modify your DAX formula for (2) to  be:

PRT1_AllDefectsFn = IF(ISBLANK([PRT0_CFnFail]),BLANK(),CALCULATE([PRT0_CFnFail],ALL(Data[FailDefectCode])))
cs_skit
Resolver IV
Resolver IV

Make Count Measure

 

Put Count Measure in Filter <> 0

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