Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I've got a card visual which is just showing a count of how many items match my filter. It works great when there are items matching, but if nothing matches it shows (Blank). How can I make it show 0 instead please?
Solved! Go to Solution.
Hi @srhsloan,
Power BI measures behave like that by design. You need to set it in your measure If you want to override this behavior. You can make your DAX measure something like this:
MEASURE = IF ( ISBLANK ( SUM ( 'Table'[Sales] ) ), 0, SUM ( 'Table'[Sales] ) )
Be aware that the this will affect how the visuals that use this modified measure and other measures that are dependent on this modified measure look.
Alternatively, you can add '+ 0' at the end of the measure calculation (displayed in the card).
Regards,
Paul.
Proud to be a Super User!
Paul on Linkedin.
Hi @srhsloan,
Power BI measures behave like that by design. You need to set it in your measure If you want to override this behavior. You can make your DAX measure something like this:
MEASURE = IF ( ISBLANK ( SUM ( 'Table'[Sales] ) ), 0, SUM ( 'Table'[Sales] ) )
Be aware that the this will affect how the visuals that use this modified measure and other measures that are dependent on this modified measure look.
You can also use the following if the dataType of the column you are working with is "string":
hope this helps anyone.
MEASURE =
IF ( ISBLANK ( COUNTA('Table'[Sales] ) ), 0, COUNTA('Table'[Sales] ) )Thanks @danextian. I wasn't using a measure, just the filter fields, but a measure has sorted out exactly what I needed. The final formula I've ended up with is
NoTShirtSize = IF(ISBLANK(COUNTBLANK('Work Items - Today'[TShirt Size])), 0, COUNTBLANK('Work Items - Today'[TShirt Size]))
Hi
I am very New to power bi can tell me Where i have to put this syntax/formula in detail?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 39 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |