Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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.
Solved! Go to Solution.
Hi @Anonymous ,
Below is my table:
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:
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.
Hi @Anonymous ,
Below is my table:
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:
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.
At the end of the Dax I always just put + 0
Could you share PBIX file
Proud to be a Super User! |
|
I can't because the information is confidential.
Check out this video if it helps
https://youtu.be/ML7VdHb6494?si=dV5RqtAlyLMLdvDF
Proud to be a Super User! |
|
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
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))
@Anonymous You can use dax for this
count=
var result=Count(Articles[Article])
return
Proud to be a Super User! |
|
Excellent, if it solved my problem😀
Try =Count(Articles[Article]) +0
Thank you but that didn't seem to do anything. I wrote it as:
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
78 | |
59 | |
36 | |
33 |
User | Count |
---|---|
94 | |
61 | |
56 | |
49 | |
41 |