Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Replacing Card Content if value is Blank

I have the following tables

 

    Books with columns:

          BookCode

          BookType

          PublicationYear

    Revnue with columns:

          BookCode

          BookRevenue

 

I have a Card View, that displays the sum of the column BookRevenue, with the following filters set:

 

On column BookType the filter is set to Fiction

On column PublicationYear filter is set to 2020

 

What I see now, is the word Blank when there is no BookRevnue for 2020. How do I get it to display 0 instead of Blank.

 

I am really new to DAX and was trying to the ISBLANK statement, but getting nowhere with it, in addition to having trouble with the filters. Anhy ideas?

9 Replies

  • Anonymous you can create a measure like this

     

    Amount = SUM ( BookRevenueTable[Book Revenue] ) + 0

    and use above measure in the card visual

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

    • Anonymous's avatar
      Anonymous
      Not applicable

      How would this handle the filters?

  • Hi Anonymous ,

     

    Just add '+0' without apostrophes to the end of whatever measure you want to show zero instead of (Blank) for.

     

    Pete

  • dax's avatar
    dax
    Icon for Community Support rankCommunity Support

    Hi Anonymous , 

    You could try above suggestions. If this doesn't work, please correct me and inform me more detailed information(such as your expected output and your sample data )? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

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