Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

greater than

Hi, 

It might be an easy question but I can't figure out the correct method. 

I have a category list 

Category Sub
A1
A2
B3
B4
 
 

 

TimestampValueSub
5/6/2022401
5/6/20221003
5/6/2022503
 

 

I would like to calculate true or false (if 3 value larger than 60 then true, less than 60 then false ; if 1 value larger than 50 then true, less than 50 then false)

 
I'm try using code below. 
 

Total value

3= CALCULATE( NOT ISEMPTY(Total value),Total value[Value] >60 )

 

Thanks for your help. 

6 Replies

  • Hi there!

    You could try something like this:

    SWITCH(

    TRUE(),

    Sub = 3 && Value > 60, TRUE,

    Sub = 3 && Value <= 60, FALSE,

    Sub = 1 && Value > 50, TRUE,

    Sub = 1 && Value <= 50, FALSE,

    BLANK()

    )

    Let me know if that help!

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi PabloDeheza

      Is create a new column or use new measure? 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi PabloDeheza , 

      There shown error in this code. 

      FYI, this are my two table. 

       

      Thanks for your help. 

       

      • PabloDeheza's avatar
        PabloDeheza
        Solution Sage

        Make sure to refer to the corresponding column and table, I used sub and value as an example, but it would be 'Total Value'[Sub] and 'Total Value'[Value] instead of just "Sub" and "Value". Also make sure you create this calculated column in Total Value table