Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 13,000 items that belong to one of the following age bands. I want them to appear in a bar chart (measuring some other value) but in the following order:
Age Band
Past due > 360 days |
Past due 181 - 360 days |
Past due 91 - 180 days |
Past due 61 - 90 days |
Past due 31 - 60 days |
Past due 1 - 30 days |
Due 0 - 30 days |
Due 31 - 60 days |
Due 61 - 90 days |
Due > 90 days |
When I tried:
match([Age Band]),'Past due>360 days','Past due - 360 days','Past due 91 -180 days','Past due 61 -90 days','Past due 31 - 60 days','Past due 1 - 30 days','Due 0 - 30 days','Due 31 - 60 days','Due 61 -90 days','Due>90 days')
It didn't work. Thanks for your help in advance.
Hi,
use this code in sort by expression
=if([Age Band]='Past due > 360 days','1', if([Age Band]='Past due 181 - 360 days','2', if([Age Band]='Past due 91 - 180 days','3', if([Age Band]='Past due 61 - 90 days','4', if([Age Band]='Past due 31 - 60 days','5', if([Age Band]='Past due 1 - 30 days','6', if([Age Band]='Due 0 - 30 days','7', if([Age Band]='Due 31 - 60 days','8', if([Age Band]='Due 61 - 90 days','9',10 )))))))))
in other way you can do it by creating a new field in your script
=if([Age Band]='Past due > 360 days','1', if([Age Band]='Past due 181 - 360 days','2', if([Age Band]='Past due 91 - 180 days','3', if([Age Band]='Past due 61 - 90 days','4', if([Age Band]='Past due 31 - 60 days','5', if([Age Band]='Past due 1 - 30 days','6', if([Age Band]='Due 0 - 30 days','7', if([Age Band]='Due 31 - 60 days','8', if([Age Band]='Due 61 - 90 days','9',10 ))))))))) as Sort
then do sorting according to sort field in sort by expression
Are you creating these bands in the script? If you are, then create them using Dual function so that you can provide them a sorting value
Hey Sunny! No, I added them later under sorting as an expression for that value.
How do I create them using dual function?
Can you share your current expression?
match([Age Band],'Past due > 360 days','Past due 181 - 360 days','Past due 91 - 180 days','Past due 61 - 90 days','Past due 31 - 60 days','Past due 1 - 30 days','Due 0 - 30 days','Due 31 - 60 days','Due 61 - 90 days','Due > 90 days')
I actually tried it again and it seemed to work, but only when I start typing "Age Band" and I select it from the drop-down.
Even though my issue is solved I'd like to know what that is.
Instead of Match try Class function
HI,
maybe if you try with pick(match)), something like this:
pick(match([Age Band],'Past due > 360 days','Past due 181 - 360 days'), 1, 2) and so on...
regards
Hi,
use this code in sort by expression
=if([Age Band]='Past due > 360 days','1', if([Age Band]='Past due 181 - 360 days','2', if([Age Band]='Past due 91 - 180 days','3', if([Age Band]='Past due 61 - 90 days','4', if([Age Band]='Past due 31 - 60 days','5', if([Age Band]='Past due 1 - 30 days','6', if([Age Band]='Due 0 - 30 days','7', if([Age Band]='Due 31 - 60 days','8', if([Age Band]='Due 61 - 90 days','9',10 )))))))))
in other way you can do it by creating a new field in your script
=if([Age Band]='Past due > 360 days','1', if([Age Band]='Past due 181 - 360 days','2', if([Age Band]='Past due 91 - 180 days','3', if([Age Band]='Past due 61 - 90 days','4', if([Age Band]='Past due 31 - 60 days','5', if([Age Band]='Past due 1 - 30 days','6', if([Age Band]='Due 0 - 30 days','7', if([Age Band]='Due 31 - 60 days','8', if([Age Band]='Due 61 - 90 days','9',10 ))))))))) as Sort
then do sorting according to sort field in sort by expression
May be because of extra spaces between Age and Band... Difficult to say much without seeing your app...