Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Creating category based on numeric values in another column using IF statement but ignoring totals

Hello Everyone,


I'm trying to create a status category based on if the Won Q3 has a value or not, 

 

my code is pretty straight forward I think, however, at the end of the table, my total shows "won" as the status, how do I remove this?

 

Status = if([Sum Won Q3]<=0,"Not Won","won")

 

 

  • Hi,

    Please try the below measure.

     

    Status =
    IF (
    HASONEVALUE ( 'yourtablename'[Reference] ),
    IF ( [Sum Won Q3] <= 0, "Not Won", "won" )
    )

2 Replies

  • Hi,

    Please try the below measure.

     

    Status =
    IF (
    HASONEVALUE ( 'yourtablename'[Reference] ),
    IF ( [Sum Won Q3] <= 0, "Not Won", "won" )
    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Jihwan,


      It worked, have a follow up question. Please see my updated matrix,

       

      I created another category for "Forecast Status" based on some additonal logic.  However I'd like to create a sum of "in forcast and won".

       
      In forecast and won =
      if([Forecast Status]="in forecast",If([Status]="won",[Sum Won Q3],0))

      Please advise.  Or I can start a new thread