Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting in bar chart

Hello everyone

Yesterday I faced with the following problem in Qlik Sence. I have some sales data by days from the beginning of 2016Y. First of all I showed the total amount of sales by the last available day. This case was successfully solved.

Then I would like post the bar chart below the KPI. On X-axis - days, Y-axis - Sum of amount. BUT! I need show the sales amount by the last 5 days. In default settings I can sort top-10/50/100 by the total sum or write some formulas for sorting, but also it links with total sum, not the days.

Can anyone explain how to sort the last 5 days in bar chart?

Thanks in advance

Labels (1)
1 Reply
lironbaram
Partner - Master III
Partner - Master III

hi

you can do something like this

create the chart

use the date field as dimension

and use this expression

sum({<Date={'>$(=date(max(Date)-5))'}>}Sales)