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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
lardo5150
Microsoft Employee
Microsoft Employee

Show Zero Count unless selected in a slicer

I currently have this setup.

I want to choose a date range

select an engineer

and it will show me the total number of critsits, normal, hot cases they took.

 

showzerocard.JPG

 

I have measure setup for each of the values from that column

 

For example, to get the count of "normal" 

CALCULATE(COUNT('Acceptance History'[CRITSIT])+0,ALLSELECTED('Acceptance History'[Engineer]),'Acceptance History'[CRITSIT]="Normal")

 

This works, but if I have no engineer elected, it still shows me the total number taken between all the engineers for that specific date range.

I want it to show zero UNTIL I select an engineer.

History'[Engineer]),'Acceptance History'[CRITSIT]="Normal")

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @lardo5150 ,

 

wrap something like this around your working measures:

IF(HASONEVALUE('<tablename>'[Engineer])
, [your measure]
, BLANK()
)

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

use isfiltered

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
TomMartens
Super User
Super User

Hey @lardo5150 ,

 

wrap something like this around your working measures:

IF(HASONEVALUE('<tablename>'[Engineer])
, [your measure]
, BLANK()
)

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Really close....

It puts the "BLANK" in there.

Is it possible to show a zero?

Hey @lardo5150 ,

 

just replace the formula BLANK() with 0

 

Hey @amitchandak , there is a tiny difference between ISFILTERED and HASONEVALUE, for this reason, I would not generally replace HASONEVALUE with ISFILTERED.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

@TomMartens 

Actually, It was open for sometime with me, and I did not realize that you have already given a solution. Thanks for the explanation.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I actually combined what he first gave me, with something I found in another post.

This worked for me.

IF(HASONEVALUE('<tablename>'[Engineer])
, [your measure]
, BLANK()
)

then combined it with this:

if(ISBLANK([Original Measure]),0,[Original Measure])

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors