Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar chart sort by data difference

I need to sort by data difference. The objective in this chart is to maintain an equal balance of inventory by item type between my two warehouses.

The first item in the chart should therefore be the item that is the least balanced across my warehouses.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Probably sort by expression, maybe something along these lines sorted descending?

fabs(sum({<Warehouse={'one'}>} Inventory)
    -sum({<Warehouse={'two'}>} Inventory))

View solution in original post

3 Replies
Not applicable
Author

I would prefer to do it within the control and not inthe script. This would enable the data to be resorted depending on the user’sfiltering.

johnw
Champion III
Champion III

Probably sort by expression, maybe something along these lines sorted descending?

fabs(sum({<Warehouse={'one'}>} Inventory)
    -sum({<Warehouse={'two'}>} Inventory))

Not applicable
Author

Thanks allot for your info. its working fine