Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

In bar chart , default line on the top

Hi All,

I have city as dimension and sales as measure(=sum(sales))

In city we have 

Boston,LA,Seattle and so on.

I want a bar chart that will show us the sales per city, however by default Boston should be always on the top of the bar chart.(even if the sales is less)

Then all other city would appear in descending order.

Is it do able ?

Kind regards,

Ashis

 

Labels (1)
1 Solution

Accepted Solutions
arpitkharkia
Creator III
Creator III

Hi,

PFA, please note this may not be the best solution but it works the way you want it.

I have made a small edit to make it more robust. Please try! 🙂

View solution in original post

10 Replies
ashis
Creator III
Creator III
Author

i guess i need to write this in sort tab

=sum({<city={'Boston'}>}Sale) , this will bring Boston on the top. However how to get other cities in descending order.

Anil_Babu_Samineni

May be sort order as expression

Dual(Match(city, 'Boston'), city)

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
ashis
Creator III
Creator III
Author

Thank you so much for your quick reply. It did not work though.
Anil_Babu_Samineni

Can you share QVW file, meantime you can try this too with descending order

Match(city, 'Boston')

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
ashis
Creator III
Creator III
Author

You can try;

city:

LOAD *

INLINE [ City, Sales Boston, 10000 LA, 26000 Seattle, 200 Washington, 500000 MA, 3000 ];

Bar chart:

Dimension - City

Expression =sum(Sales)

arpitkharkia
Creator III
Creator III

Hi,

PFA, please note this may not be the best solution but it works the way you want it.

I have made a small edit to make it more robust. Please try! 🙂

ashis
Creator III
Creator III
Author

Hi Arpit,

Thank you so much for your solution.

I am wondering why  =maxsales (in text box) giving me error in expression. so does the the expression in sort tab.

Any idea.

 

 

arpitkharkia
Creator III
Creator III

I have created a variable of maxsales where it is equal to sum(sales).

Im doing this so that Boston appears on the top of the graph.

I hope this makes sense.

ashis
Creator III
Creator III
Author

I got it. It works now.

 

Thank you so  much.