Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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! 🙂
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.
May be sort order as expression
Dual(Match(city, 'Boston'), city)
Can you share QVW file, meantime you can try this too with descending order
Match(city, 'Boston')
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)
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! 🙂
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.
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.
I got it. It works now.
Thank you so much.