Forum Discussion

farhad_mahan's avatar
farhad_mahan
New Member
2 years ago

problem with "if" function

Hi every one

When I select the if function, the dex bar does not show the columns that I select

please help me

πŸ›‘

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi farhad_mahan 

    It seems that you use the if() function in measure, when you use the condition, you need to add some function then the column can display,

    e.g 

    Measure =
    IF ( SELECTEDVALUE ( table[id] ) = 1, 1, 0 )
    

    If the column type is number, you can use the function as Idrissshatila  mentioned, such as sum(), max() and so on, if the column type is text you can use the function such as, max(), selectedvalue().

     

    Best Regards!

    Yolo Zhu

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