Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Conditional Statement

Hi, 

Does anyone knows of a function to solve this problem? I want to write a conditional statement with DAX.

The problem is  "if there are more than 2 number "5", then ..."

Would appreciate if you guys help me, Thanks!

  • Hi Anonymous ,

    you can create this calculated column:

    More than 2 "5" = IF('Facts36'[Value1] =5 &&'Facts36'[Value2]=5 && 'Facts36'[Value3] =5,
                "Yes")
    and then you can filter the table for "Yes"

     

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

5 Replies

  • Hi Anonymous ,

    you can create this calculated column:

    More than 2 "5" = IF('Facts36'[Value1] =5 &&'Facts36'[Value2]=5 && 'Facts36'[Value3] =5,
                "Yes")
    and then you can filter the table for "Yes"

     

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

     

    what do you mean by more than 2 numbers?

    Something like this

     

    • Anonymous's avatar
      Anonymous
      Not applicable
      James555
      Lucas331

       

      For example, James' row has the value "5" more than 2. 

  • Is your table like table A or Table B? Which is your expexted result?

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have table A just like u created. I want to transform my table A to 

      I only want to display names who has the value "5" more than twice.