Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
sde821
Contributor II
Contributor II

Sorting Bar Chart

Hi all,

I have a problem by sorting a bar chart by dimension quarter. I want to show only the last 4 quarters in my bar chart. It should change dynamically when data of the next quarter is available. At the moment my bar chart looks like this:

sde821_0-1707988307190.png

instead of Q3 2023, Q4 2022 is shown. 

Settings of sorting is numerically ascending. 

other settings:

sde821_1-1707988778205.png

It looks like Qlik is still sorting by measure 'Zugänge'.

I don't know whats wrong and how to change this. 

I appreciate every help.

 

Labels (5)
1 Solution

Accepted Solutions
Antoine04
Partner - Creator II
Partner - Creator II

Yes, that would be better. Something like this then :

Antoine04_0-1707992482321.png

And finaly in your chart :

Antoine04_1-1707992504523.png

I can send you the qvf if you want 🙂

View solution in original post

9 Replies
sde821
Contributor II
Contributor II
Author

sde821_0-1707989632467.png

 

Antoine04
Partner - Creator II
Partner - Creator II

Hello,

Indeed, you won't be able to show the last 4 by using this option.

My best advice would be to use a formula in the set analysis to do this.

Something like : Sum({<QuarterName={">=$(=QuarterName(AddMonths(Today(),-12)))"}>}Sales)

Best regards,

Antoine L

Antoine04
Partner - Creator II
Partner - Creator II

I just tried and it's working.

My DATA are shown in the table :

Antoine04_0-1707989937961.png

Here is the formula of the barchart :

Sum({<Date={">$(=AddMonths(Max(Date),-12))"}>}Amount)

 

Best Regards,

Antoine L

Antoine04
Partner - Creator II
Partner - Creator II

Hello @sde821,

Could you paste here the data in tabular mode ? (and not in picture)

Then I can try on my Qlik 🙂

Thanks

sde821
Contributor II
Contributor II
Author

Hi Antoine,

in my example I would need the sum of the datapoints closed, cancelled and waiting.

Thank you!

Anna

Antoine04
Partner - Creator II
Partner - Creator II

OK, I see. So what you need to do in the Excel file is first to associate a Date to each Quarter, so maybe something like this in the load script :

Antoine04_1-1707992033689.png

Then, I get this. Does it fit your expectation ?

Antoine04_0-1707992001125.png

 

The formula is : Sum({<Date={">$(=AddMonths(Max(Date),-12))"}>}Amount)

sde821
Contributor II
Contributor II
Author

I would need to put the datapoints into different groups. For example open, waiting and and new as group 1, old, closed and cancelled as group 2 and so on. Maybe I can do this in my load script?

Antoine04
Partner - Creator II
Partner - Creator II

Yes, that would be better. Something like this then :

Antoine04_0-1707992482321.png

And finaly in your chart :

Antoine04_1-1707992504523.png

I can send you the qvf if you want 🙂

sde821
Contributor II
Contributor II
Author

Thank you! Perfect solution!