Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
cklimmer
Contributor

Sort Order in a QoQ bar chart

Dear all,

I try to create a bar chart with a Quarter over Quarter and Year over Year comparison.

The below Screenshot is displaying the current status of my development.

Currently I stuck at two points:

a) The sort order of the Bars, the sorting should start on the right side with the last full Quarter Q2 - 2017 compared with Q2 - 2016 to the left ending with Q3 - 2016 compared with Q3 - 2015.

b) Hiding the empty Year Bars in the chart

Chart.JPG

Until now I tried to solve this with the default Sorting settings.

Sort.JPG

Is there a way to solve my questions within QlikView or do I have to setup a "special" Dimension in the Script?

Many thanks in advance and best regards,

Claus

Tags (4)
1 Solution

Accepted Solutions

Re: Sort Order in a QoQ bar chart

Try this

=Max({<DATE={"<=$(=QuarterEnd(Max(DATE), -2))"}>}DATE)

Capture.PNG

View solution in original post

5 Replies

Re: Sort Order in a QoQ bar chart

I assume, You need Dual() function in the script itself as you are not aware we can not make as 2 dimensions with as need

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
cklimmer
Contributor

Re: Sort Order in a QoQ bar chart

Many thanks for your hint. Indeed, the DUAL function could help to solve the sort question.

I'll check this out...

cklimmer
Contributor

Re: Sort Order in a QoQ bar chart

Dear all,

Unfortunately until now I wasn't able to solve this question.

I tried a lot of things but nothing worked sufficient for me.

I attached a sample qvw where I tried to sort the Quarters by a YEAR-QUARTER DUAL field.
But the result is always the same... the sort order is not as expected.

Q3 has the oldest data but the Quarter is always displayed as last Quarter.
The expected sort order should be from left to right "Q3", "Q4", "Q1" and "Q2".

And it makes no difference if I hide the YEAR Dimension or not.

QoQ sort.JPG

Maybe someone has an idea to solve this?


Many thanks in advance and best regards,

Claus

Re: Sort Order in a QoQ bar chart

Try this

=Max({<DATE={"<=$(=QuarterEnd(Max(DATE), -2))"}>}DATE)

Capture.PNG

View solution in original post

cklimmer
Contributor

Re: Sort Order in a QoQ bar chart

Dear Sunny,

Many thanks for your reply. Your solution solves my question totally!

Sorting by date with a limitation of the displayed Quarters looks so easy now... 🙂

Best regards,

Claus