Announcements
cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## 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

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

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

1 Solution

Accepted Solutions
MVP

Try this

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

5 Replies

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

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

I'll check this out...

Anonymous
Not applicable
Author

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.

Maybe someone has an idea to solve this?

Many thanks in advance and best regards,

Claus

MVP

Try this

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

Anonymous
Not applicable
Author

Dear Sunny,