Forum Discussion

nicolas_q's avatar
nicolas_q
Regular Visitor
4 years ago
Solved

Replace Blank with 0

Hello all,   the subject has been already discussed but I can't find a way to achieve what I need. The use case is the following: For some computers if a reboot is needed I have a value "1" if th...
  • Anonymous's avatar
    Anonymous
    4 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]))+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.