Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

IF ELSE?

Hello,

 

My IF ELSE is not working. Is there any alternative for this?

 

Can someone help me create a logic that will classify POR column, it is a calculated column which i would need to divide it into two classification:

 

IF POR > 300,000 THEN "HIGH"

ELSE "LOW"

 

I tried to do that using IF else but the calculation only showing "LOW"

 

file is located in this link as sample:

 

https://www.dropbox.com/s/qd14m37oe68db27/sampledata.pbix?dl=0

 

Thanks!!

 

 

  • Anonymous 

    if you want to filter , you can change the column to 

    POR 300 CUTOFF = IF(CALCULATE(sum(Table1[POR]),ALLEXCEPT(Table1,Table1[Project Number]))>300000,"high","low")

    and use that column in the slicer visual

6 Replies

  • Anonymous 

    you can sort the POR column 

     

    as you can see the biggest value is 158581 which is less than 300000. that's why you only get "LOW"

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, ryan_mayu 

       

      I see, so it's a row level perspective. how about in showing the high and low in the specific view, like this: 

       

      POR is showing high values but the result is still low 

       

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        Anonymous 

        You can try this

        Measure = if(SUM(Table1[POR])>300000,"HIGH","LOW")
  • Anonymous , In power query

    a new column

    if [POR] > 300000 then "HIGH" else "LOW"

     

     

    in DAX a new column

    IF( [POR] > 300000 , "HIGH" ,"LOW")