Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Measure with If statement checking for value

Hey everyone,

 

In my dataset I have a column called "Isclosed" which has a value of True or False.

 

In my vizualisation I am trying to create a "card" or anything that display "Closed" if the value is True (True=Closed) and "Active" if the value False (False=Active).

 

What kind of measure can I do to help me out with this?

 

Thank you

  • Nathaniel_C's avatar
    Nathaniel_C
    6 years ago

    Hi Anonymous ,
    Here is a picture with either a table or a card.
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πŸ‘are nice too.
    Nathaniel

     

     

8 Replies

  • Nathaniel_C's avatar
    Nathaniel_C
    Community Champion

     

    If(table[IsClosed] = "True","Closed","Active")

    Hi Anonymous ,
    Try this.
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πŸ‘are nice too.
    Nathaniel 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey there Nathaniel,

       

      It keeps giving me a error as I cant select the table[IsClosed]. This is probably because I need a aggregate function? This is what I get

       

      Let me know what you suggest.

  • Anonymous's avatar
    Anonymous
    Not applicable

    UPDATE

     

    I have tried to combine a aggregate function like below 

     

     

     

    status = If(ALL('TimeExport (3)'[BudgetClosed]) = "True","Closed","Active")
     
    but I got this error 
     
    This is most likely because the values in the table are booleans.
    any solution would be greatly appreciated!
      • Anonymous's avatar
        Anonymous
        Not applicable

        hey Nathaniel_C  i appreciate the help,

         

        I am still getting this error when using MAX