Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

COUNTA if blank

Hello

 

I am using COUNTA to count whenever there isnt a date in a row and then i put it in a card to showcase count.

DOScountbypurchase = COUNTA(Table[Dateofpurchase])
 
When I select a value where there is no date of purchase it shows "blank" in the card.(see below)

 

How do I showcase a custom message whether it be "0" or "No Dates" instead of saying "(Blank)". 

2 Replies

  • Anonymous 

    you can try this

     

    DOScountbypurchase = COUNTA(Table[Dateofpurchase]) +0

     

    or 

     

    DOScountbypurchase =if(isblank( COUNTA(Table[Dateofpurchase])),"No Dates")

  • Hi,

    Drag this measure to a card visual

    Measure = coalesce([DOSCountbypurchase],0)

    Hope this helps.