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: 
JennyP
Contributor
Contributor

Bar Chart & Order Card

Hi,

I have a bar chart and need to reorder the bars.  The dimension is a calculated field (returning text, not a number) and the order card just reflects {{subTitleText}} so I am unable to re-order the dimension data fields.  I did reorder the dimension from which I used for the calculated field and it still didn't work.  What's weird is I had this working and then all of the sudden today I noticed that one of the dimension fields was missing and I couldn't figure out why so I just started over.  I just want my bar chart to show bars for the following in the following order: 'NONE', 'HIGH', 'MEDIUM', 'LOW'.  Does anyone have experience with this?  I appreciate any assistance.

 

Thank you!

Jenny

6 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

You should order your dimension by expression (an option in Sort properties), and that expression could be like:

Match(YourField, 'NONE', 'HIGH', 'MEDIUM', 'LOW')

You will get 1 for NONE, 2 for HIGH and so on.

JG

JennyP
Contributor
Contributor
Author

Thank you JG, but that didn't work.  Maybe I am not understanding you, but even if it did work, I need the bar names to reflect the text, not a number.  I tried an expression similar to your suggestion using an IF statement , but it is changing the dimension names to the order number.  It's confusing because I watched a video where someone reordered regions using the IF statement method I mentioned and in the video the bar names remained as they were so I am not sure why I am getting 1, 2, 3, 4.

JuanGerardo
Partner - Specialist
Partner - Specialist

Maybe it is better with an example:

JuanGerardo_0-1619641681601.png

Expression:

Match([Region Name], 'Western', 'Central', 'Southern', 'Northeast')

 

JG

JennyP
Contributor
Contributor
Author

I appreciate the screenshot, thank you!  Unfortunately it is still not working.  I am not sure what I am doing wrong.  I entered the expression and nothing changed.  Do you by chance know why the Order card for this dimension reflects  {{subTitleText}}?

 

JuanGerardo
Partner - Specialist
Partner - Specialist

{{subTitleText}} doesn't seem to be any Qlik Sense expression, problably is to indicate a place tu put the subtitle text for the chart.

For my expression to work, you have to change the [Region Name] field by your field name, and the following region names by your values 'NONE', etc. in the order you want.

JG

JennyP
Contributor
Contributor
Author

At this point I think I am having system issues.  Thanks for everything.  I believe my expression is entered correctly.  I started over and reloaded my data and the fact that the Order Card still reflects {{subTitleText}}, something is wrong.  When it was working, I was able to change the order with no problem so the fact that the Order Card on a non-calculated dimension field is reflecting {{subTitleText}}, something is wrong...

There have also been several other glitches.  I am hoping to get in touch with our system admin and get additional help.