Forum Discussion

bdehning's avatar
bdehning
Post Prodigy
4 years ago

Replace no value with a zero in Conditional Column

I have a Conditonal Column

 

Litigated Text

 

If Litigated equals "True" Outout  Litigated

Else 'Not LItigated"

 

If there are no rows in a given year, I want to show a zero and not a blank in a table I created.  What can I add to the conditional column?

8 Replies

  • Syk's avatar
    Syk
    Resident Rockstar

    Which column are you trying to have the zero in? Also, can you post a screenshot of your conditional column settings?

    • bdehning's avatar
      bdehning
      Post Prodigy

      For a given year in a table, there may not be a Litigated or Not Litigated as all may be one of the choices.  I would like to show a zero when there were none for the two choices.  

      • Syk's avatar
        Syk
        Resident Rockstar

        For the matrix values are you using a measure? 

  • I do use a measure to count the Litigated and Not Litigated and probably where I need to introduce a 0.

     

    The measure is Count = CALCULATE(COUNT([Total Gross Incurred]))

    • Syk's avatar
      Syk
      Resident Rockstar

      Yes! Just add a +0 on the measure

      Count = CALCULATE(COUNT([Total Gross Incurred])) + 0
  • That did not work as still blanks.  I did a  -1 as a test on the measure and the other numbers reduced by 1. 

    I think the issue is there are no values so + 1 with no value may still be no value.

    I need to keep wokrig on this.  

    • Syk's avatar
      Syk
      Resident Rockstar

      Well lets try using the coalesce function instead..

      Count = COALESCE(COUNT([Total Gross Incurred]),0)