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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to change a card from (Blank) to 0?

I have a card that's showing me vacancies in different departments. If a particular department doesn't have any vacancies, it's showing as (Blank) on the card. I have been trying to change that show a zero but everything I've seen shows a DAX formula to address a blank or null in the data. There isn't a null or blank in the data to replace. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

 Hi @Anonymous ,

Below is my table:

vxiandatmsft_0-1703472303916.png

The following DAX might work for you:

Measure = IF(ISBLANK(COUNTROWS('Table (2)')),0,COUNTROWS('Table (2)'))

The final output is shown in the following figure:

vxiandatmsft_1-1703472353266.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

13 REPLIES 13
Anonymous
Not applicable

 Hi @Anonymous ,

Below is my table:

vxiandatmsft_0-1703472303916.png

The following DAX might work for you:

Measure = IF(ISBLANK(COUNTROWS('Table (2)')),0,COUNTROWS('Table (2)'))

The final output is shown in the following figure:

vxiandatmsft_1-1703472353266.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

spandy34
Responsive Resident
Responsive Resident

At the end of the Dax I always just put + 0

bhanu_gautam
Super User
Super User

Could you share PBIX file




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Anonymous
Not applicable

I can't because the information is confidential.

Check out this video if it helps

 

https://youtu.be/ML7VdHb6494?si=dV5RqtAlyLMLdvDF




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Anonymous
Not applicable

I watched the video and tried that formula. I didn't work. I'm not sure I'm writing it correctly because I don't know if I should be using empl_fte or position status in the formula. I tried both but it didn't change the (blank).

 

I also tried 

TA Vacancies = COALESCE(CALCULATE(SUM(RAP[EMPL_FTE])),0)
that didn't change anything either. 
 
Screenshot 2023-12-14 161442.jpg

Try:

TA Vavancies = IF(ISBLANK(SUM(RAP[POSITION STATUS])),0, SUM(RAP[POSITION STATUS))

 or

TA Vavancies = IF(ISBLANK(COUNT(RAP[POSITION STATUS])),0, COUNT(RAP[POSITION STATUS))

 

bhanu_gautam
Super User
Super User

@Anonymous  You can use dax for this

count=

var result=Count(Articles[Article])
return

IF(ISBLANK(result),0,result)
 
Please accept it as solution if it helps...



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Excellent, if it solved my problem😀

Try =Count(Articles[Article]) +0

Anonymous
Not applicable

Thank you but that didn't seem to do anything. I wrote it as: 

 

count = var result=COUNT(RAP[EMPL_FTE]) RETURN IF(ISBLANK(result),0,result)
 
This is my first time creating a dashboard and writing dax so I appreciate any insights you have. 
Here's a screenshot if that makes it more clear.
 
Screenshot 2023-12-14 115516.png
Anonymous
Not applicable

I also tried the DAX using the column position_status which shows if it is a vacant position. 

 

TA should show up as a zero since there would not be any vacant TA positions in a para role. 

 

I think it depends on how you structured your dataset such as values available in Power Query, values calculated in DAX, values calculated in fields. If the calculation isn't complex, I usually add a measurement and use the measurement in the card.

Measurement:

TA Vavancies IS ZERO = IF(ISBLANK(COUNT('Your Query Name'[Your field name])),0, COUNT('Your Query Name'[Your field name]))

However, this is just a simple count measurement but you may leverage the concept based on your dataset/data structure.

 

Chenp_0-1702580523366.png

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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