Forum Discussion

Applicable88's avatar
Applicable88
Icon for Impactful Individual rankImpactful Individual
5 years ago
Solved

Calculated Column in DAX, if no value then...

Hello,

I have a table which mostly has no dataset at the very beginning of the month. Thats because its a forecast sales data for current month, which will be known some time in the first days of a month.

So this table has no rows by then. So I wanted a card to display "TBA"= To be announced, instead of "empty" which is default behaviour from PowerBi Card visualization. 

I did following for calculated column:  

if (  isblank( 'sales'[Forecast]), "TBA", 'sales'[Forecast]) 

also tried with = blank() and other functions. Simply not working. Does DAX won't create a empty row with just a new column stating TBA, because the table has no rows? 

Thank you in advance.

Best. 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Applicable88 ,

     

    If your data model does not have any data, it will not be displayed if you add a calculated column, you can use a measure instead.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Applicable88 ,

     

    If your data model does not have any data, it will not be displayed if you add a calculated column, you can use a measure instead.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Applicable88's avatar
      Applicable88
      Icon for Impactful Individual rankImpactful Individual

      Hello amitchandak ,

      not working. 

      I think if there are no rows input into DataModell, the format () cannot format from "nothing" and also isblank cannot check for blank when rows=0. Thats what is stated in the left bottom side. zero rows.