Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
patrou38
Creator
Creator

Sort a chart by dimension

Hello,

I need help to sort my chart by the dimension, but on the labal ? is it possible ? any workaround ?

as you can see in my attached exemple this is not very easy.

I would like to have a sort like this:

Day <=3, Day 3-5, Day 5-7, Day 7-10, Day 10-12 and Day sup 12.

Thank you for your help.

Best regards,

Patrick

2 Solutions

Accepted Solutions
tresesco
MVP
MVP

You need to modify the expression a bit like:

=if(Day<=3 ,Dual('Day <=3',0),
if(Day>=3 and Day<5,dual('Day 3-5',1),
if(Day>=5 and Day<7,dual('Day 5-7',2),
if(Day>=7 and Day<10,dual('Day 7-10',3),
if(Day>=10 and Day<12,dual('Day 10-12',4),
if(Day>=12 , Dual('Day sup 12',5)))))))

View solution in original post

sunny_talwar

You might also want to simplify your if statement by using something like this

=If(Day <= 3, Dual('Day <=3', 0),
 If(Day < 5, Dual('Day 3-5',1),
 If(Day < 7, Dual('Day 5-7',2),
 If(Day < 10, Dual('Day 7-10',3),
 If(Day < 12, Dual('Day 10-12',4), Dual('Day sup 12', 5))))))

View solution in original post

4 Replies
tresesco
MVP
MVP

You need to modify the expression a bit like:

=if(Day<=3 ,Dual('Day <=3',0),
if(Day>=3 and Day<5,dual('Day 3-5',1),
if(Day>=5 and Day<7,dual('Day 5-7',2),
if(Day>=7 and Day<10,dual('Day 7-10',3),
if(Day>=10 and Day<12,dual('Day 10-12',4),
if(Day>=12 , Dual('Day sup 12',5)))))))

sunny_talwar

You might also want to simplify your if statement by using something like this

=If(Day <= 3, Dual('Day <=3', 0),
 If(Day < 5, Dual('Day 3-5',1),
 If(Day < 7, Dual('Day 5-7',2),
 If(Day < 10, Dual('Day 7-10',3),
 If(Day < 12, Dual('Day 10-12',4), Dual('Day sup 12', 5))))))
Anil_Babu_Samineni

@sunny_talwar@tresesco - Will that New Community, Will make changes the flag? Seems, You and Sunny together got Correct Answer?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Yes, it appears that multiple responses can be marked as the correct response. It seems to be similar to how Helpful responses used to work in JIVE.