Forum Discussion

Chthonian's avatar
Chthonian
Icon for Helper III rankHelper III
6 years ago
Solved

Filter Context Issue when trying to Show Records with No Data

Hello my PowerBi friends,    I have (hopefully) a simple filtering issue when I am trying to show records with no data in a Table visual and hoping somebody in the datasphere can help.   Scenario...
  • az38's avatar
    az38
    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