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 nicolas_q ,
When you get data from your sql source, what is data type?
How that data look, like 1 is shown as 1 and 0 is shown as 0 or blank/null?
If it is blank/null and data type is number, then first convert data type to text. Because replace function in power query can only replace null or blank with something if it is text.
Then replace null or blank with 0.
Then you can convert back the column to whole number if needed.