Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

Bar Chart Expressions Order

I have a combo chart that uses grouped and stacked bars to compare Allocated vs Actual (Plus PTO) hours. I cannot seem to figure out how to get the Allocated (blue) bar before the Actual (orange and green) bars. I'm certain there must be a way. Help!

7-15-2015 9-14-34 AM.gif

Thanks in Advance!

Cassandra

1 Solution

Accepted Solutions
Highlighted

It's because your flag is null for the values that aren't 1 and QV always sorts null values to the end.

To fix, change your dimension for Flag to:

alt(Flag,0)

And then sort your Flag dimension by Numeric Value:

Capture2.PNG

View solution in original post

10 Replies
Highlighted
Partner
Partner

Not sure what your dimensions and your expressions are?? Also don't think you can have mixed stacked and grouped, probably both stacked, but only 1 value(color?) for the blue one by the expression?

For an expression, you can select and just promote the Allocated Effort expression

For a dimension something like

=Match(YourDimension,'Allocated Effort','Actual Effort',.....)

Highlighted
Specialist
Specialist

Please see my screenshot. I am comparing Allocated (grouped) to Actual + PTO (stacked). This is accomplished by adding a flag as a dimension.

7-15-2015 9-44-09 AM.gif

Allocated is already first in my Expression list.

7-15-2015 9-34-51 AM.gif

Highlighted
Partner
Partner

Then you can probably just sort on the Flag dimension, if the flag is a number you can sort on numeric value for that dimension, ascending or descending. When it's text use sort on expression with the expression I already mentioned, sometehing like

=Match(Flag,'Yes','No')

Highlighted
Specialist
Specialist

Thanks for the response.

My other dimension is a date (month/year) and that is the sort order for the x-axis. I'm new to using Flags, so please forgive my ignorance, but how would this work?

7-15-2015 9-57-10 AM.gif

Highlighted
Partner
Partner

That's ok Cassandra, select FLAG_PTO in the dimensions area, then depending on the contents of FLAG_PTO as explained in my previous post only select numeric value in the sort by section, or only select the expression and use the expression e.g. =Match(Flag,'Yes','No')

Let me know

Highlighted
MVP
MVP

Can you post sample?

Highlighted
Specialist
Specialist

Sample attached - I want the Allocated bar on the left and Stacked Actuals on the right

Highlighted

It's because your flag is null for the values that aren't 1 and QV always sorts null values to the end.

To fix, change your dimension for Flag to:

alt(Flag,0)

And then sort your Flag dimension by Numeric Value:

Capture2.PNG

View solution in original post

Highlighted
Specialist
Specialist

Thanks Nicole! I haven't seen the alt function before.