Forum Discussion
Filter Context Issue when trying to Show Records with No Data
- 6 years ago
Hi Chthonian
COUNTROWS() can not return you blank. If no rows founded it will return you 0, as described here https://docs.microsoft.com/en-us/dax/countrows-function-dax
so, you should compare it with 0 in if, like
Total Opportunities QTY = IF( COUNTROWS(Opportunities) = 0, 0, COUNTROWS(Opportunities) )but it has no sense, I think 🙂
so,for conditional formatting it could be less strictly condition
🙄😣😴 - So, I am indeed being a numpty!! Conditional formatting caters for 'is Blank' I am a silly muppet, so sorry folks 😅
While I have solved my issue in this instance, I would be interested to know why filters are stripped using the ISBLANK() dax in a measure, so if anybody is in a teaching enlightening mood, my brain is always eager to understand these things.
SOLUTION:
Hi Chthonian
COUNTROWS() can not return you blank. If no rows founded it will return you 0, as described here https://docs.microsoft.com/en-us/dax/countrows-function-dax
so, you should compare it with 0 in if, like
Total Opportunities QTY = IF(
COUNTROWS(Opportunities) = 0,
0,
COUNTROWS(Opportunities)
)
but it has no sense, I think 🙂
so,for conditional formatting it could be less strictly condition
- lokar782 years agoRegular Visitor
From the page you linked:
When the table argument contains no rows, the function returns BLANK.