Forum Discussion
ArchStanton
Power Participant
3 years agoDate Bandings require sorting in visual
Hi, I have various date bands ranging from 0-3mths, 3-6 and so on all the way up to 12 mths +. These are not sorted when I add them to the Y axis in my visual so I was thinking of ranking them 1...
- 3 years ago
Hi ArchStanton ,
Pls test the below:
RANK = IF ( [Age Profile Creation Months] = "0-3 Months", 1, IF ( [Age Profile Creation Months] = "3-6 Months", 2, IF ( [Age Profile Creation Months] = "6-9 Months", 3, IF ( [Age Profile Creation Months] = "9-12 Months", 4, IF ( [Age Profile Creation Months] = "12+ Months", 5,BLANK() ) ) ) ) )Return:
Best Regards
Lucien
johnt75
Super User
3 years agoreplace the "N/A" with 6. You can't return an integer and a string into the same column.
ArchStanton
Power Participant
3 years agoIt still has the same error when N/a is replace with 6
- johnt753 years ago
Super User
that's still a string, you need to return the number 6 without the quotes
- ArchStanton3 years ago
Power Participant
I've tried lots of variations and the error just keeps appearing:
- johnt753 years ago
Super User
the switch statement should not have any = signs in it. the first argument should be the column name, then a list of pairs of values separated by commas, see my original post for the template.