Forum Discussion
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
- parry2k
Super User
Anonymous you can create a measure like this
Amount = SUM ( BookRevenueTable[Book Revenue] ) + 0and 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.⚡
- AnonymousNot applicable
How would this handle the filters?
- parry2k
Super User
Anonymous what about filters?
- BA_Pete
Super User
Hi Anonymous ,
Just add '+0' without apostrophes to the end of whatever measure you want to show zero instead of (Blank) for.
Pete
- dax
Community 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 ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.