Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Margaret
Creator II
Creator II

expression sort consistent

How can I make the colors in a stacked bar chart always appear in the same order (across dimension values)? See in image how green "Order to Collection" section sometimes appears in one month second from top, in another month last (4th from top).

StackedBarSortConsistent.PNG

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be you can try like?

= Fabs(Median(Ord_Coll_Mins))

View solution in original post

11 Replies
vishsaggi
Champion III
Champion III

Can you share a sample.? May be your June 2017 sum value is less than 10 so it is plotting the color near that axis.

rubenmarin

I made some tests and I can't get the same result, the expressions are always sorted in the same order.

Can you post a sample to check?

Margaret
Creator II
Creator II
Author

it is close to 10 in May too though. I will post a sample as soon as I can. Have to clear out all the irrelevant stuff first...

Margaret
Creator II
Creator II
Author

see attached.

vishsaggi
Champion III
Champion III

Your OrderTocollection for Month June-2017 shows -1 ? This could be the reason.

vishsaggi
Champion III
Champion III

May be you can try like?

= Fabs(Median(Ord_Coll_Mins))

View solution in original post

Margaret
Creator II
Creator II
Author

You're right. It's the "-1". But its supposed to be "-1", not "1". (We have some psychics around here.)

Thank you.

So I need to figure out how to ignore negative numbers..... or turn any negative number into a zero...?

Margaret
Creator II
Creator II
Author

Or maybe I'll just explain to end users what they are looking at... It does a pretty job of illustrating what's going on.

The only better option would be to Collection to Receive time overlap with Arrival to Order time by one minute.

vishsaggi
Champion III
Champion III

‌oh Ok you can turn negative values to 0 using if like

= If (median(Ord_Coll_mins) < 0, 0, median(ord_coll_mins))