Forum Discussion
Replace Blank with 0
- Anonymous4 years ago
Hi nicolas_q ,
I can reproduce your problem. I think this should be caused by your data model. You table should look like as below.
And you use count function in value field in card visual and filter [Reboot] column to get result. When you show items when the value is not 0 in [Reboot], Power BI couldn't find any hostname and it will return blank. Blank in Power BI logic is same as 0.
If you don't want to show blank in card visual, please try to create measure.
Count hostname = CALCULATE(COUNT('Table'[hostname]))+0Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for you reply,
Well i'm really new into BI, I'm sorry but I don't understand.
I collect the data from SQL database, it arrives into a column with a 0 or 1 values.
In the visual, I get the column but I didn't not create a measure.
I don't know what kind of measure i can add?
Here what I have:
what I have if all my computer are rebootedI would have 0 instead Blank
Thank for you help
Hi nicolas_q ,
I can reproduce your problem. I think this should be caused by your data model. You table should look like as below.
And you use count function in value field in card visual and filter [Reboot] column to get result. When you show items when the value is not 0 in [Reboot], Power BI couldn't find any hostname and it will return blank. Blank in Power BI logic is same as 0.
If you don't want to show blank in card visual, please try to create measure.
Count hostname =
CALCULATE(COUNT('Table'[hostname]))+0
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- nicolas_q4 years agoRegular Visitor
Hello,
thanks for your help, i've tried several things, and i could find this solution :
CUSTOM_REBOOT_BLANCK/0 = IF(ISBLANK(Sheet1[reboot]),0,Sheet1[reboot])Thanks for your help 🙂 - Anonymous2 years agoNot applicable
Had this exact problem and found this thread. Your suggestion to create the "+0" measure worked perfectly. Thanks for the advice!