Forum Discussion
Anonymous
3 years agoNot applicable
Help me correct this DAX Sorting Column
I need help solving this formula. It is a sorting column
Age bins Sort =
SWITCH(TRUE(),
'Table'[Age Bins] = "0- 30 Days",
"1",
'Table'[Age Bins] = "31- 60 Days",
"2",
'Table'[Age Bins] = "61- 90 Days",
"3",
'Table'[Age Bins] = "> 90 Days",
"4"
)
you can save the last condition, by changing it to:
Age bins Sort =SWITCH(TRUE(),'Table'[Age Bins] = "0- 30 Days","1",'Table'[Age Bins] = "31- 60 Days","2",'Table'[Age Bins] = "61- 90 Days","3","4")
2 Replies
- FreemanZSuper User
you can save the last condition, by changing it to:
Age bins Sort =SWITCH(TRUE(),'Table'[Age Bins] = "0- 30 Days","1",'Table'[Age Bins] = "31- 60 Days","2",'Table'[Age Bins] = "61- 90 Days","3","4")- AnonymousNot applicable
Works perfectly. Thanks.