Forum Discussion

nisha_deepak's avatar
nisha_deepak
Helper III
5 years ago

condition based on on column

i have report which contains one number field....values are like -120,-131,-12,-1,0,1,2,3,30,32,34,60,61,62,87,90,91 etc.

I need another column based on some conditions apply with above mentioned column.The condition i want is if value -120 or -131 or any negative value means that all are mentioned like" nothing" ,if value is o means show as "expired " and if value is from range 1-30 means "30 days" ,if value is 31-60 means "60 days" ,if value is 61-90 means "90 days" like that i want show in new column.Plse

help me.here am attaching sample report i want

 

2 Replies

  • tex628's avatar
    tex628
    Community Champion

    Try a calculated one with the following:

    Column = 
    IF( [Value] = 0 , "Expired",
    IF( [Value] < 0 , "Nothing",
    IF( [Value] < 31 , "30 Days",
    IF( [Value] < 61 , "60 Days", 
    IF( [Value] < 91 , "90 Days",
    "Over 90"


    Let me know how it goes! 🙂

    Br
    J

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi nisha_deepak 

    You can also add a column in Power Query Editor by Add column -> Conditional Column.

    Best Regards,

    Community Support Team _ Jing Zhang

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