Forum Discussion
undefined
- Anonymous3 years ago
- 3 years ago
Read about "Sort a column by another column".
Your code can be cleaned up:
=SWITCH ( TRUE (), YEAR(Task[UpdatedDate])=1970,BLANK() Task[UpdateAge_Days] <1 ,"<1 Day", Task[UpdateAge_Days] <=2,"1-2 Days", Task[UpdateAge_Days] <=3,"3 Days", Task[UpdateAge_Days] <=5,"4-5 Days", Task[UpdateAge_Days] <=10,"5-10 Days", ">10 Days " ) - 3 years ago
hi Anonymous
You need to creat two columns
- the first one , as lbendlin have write , with the efective label that you want:
Label = SWITCH ( TRUE (), YEAR(Task[UpdatedDate])=1970,BLANK(), Task[UpdateAge_Days] <1 ,"<1 Day", Task[UpdateAge_Days] <=2,"1-2 Days", Task[UpdateAge_Days] <=3,"3 Days", Task[UpdateAge_Days] <=5,"4-5 Days", Task[UpdateAge_Days] <=10,"5-10 Days", ">10 Days " )- and the ohther one for the sort:
Label (sort) = SWITCH ( TRUE (), YEAR(Task[UpdatedDate])=1970, 99, Task[UpdateAge_Days] <1 , 1, Task[UpdateAge_Days] <=2, 2, Task[UpdateAge_Days] <=3, 3, Task[UpdateAge_Days] <=5, 4, Task[UpdateAge_Days] <=10, 5, 6 )like this you can use column "Label (sort)" to sort the first one.
Any other question please ask.
Best regards
Bruno Costa | Impactful Individual
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
You can also check out BI4ALL's website and our data solutions! - 3 years ago
hi Anonymous
Does my suggestion work?
If yes then please accept my answer have solution thanksBest regards
Bruno Costa | Impactful Individual
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
You can also check out BI4ALL's website and our data solutions!
Read about "Sort a column by another column".
Your code can be cleaned up:
=SWITCH (
TRUE (),
YEAR(Task[UpdatedDate])=1970,BLANK()
Task[UpdateAge_Days] <1 ,"<1 Day",
Task[UpdateAge_Days] <=2,"1-2 Days",
Task[UpdateAge_Days] <=3,"3 Days",
Task[UpdateAge_Days] <=5,"4-5 Days",
Task[UpdateAge_Days] <=10,"5-10 Days",
">10 Days "
)