Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

oric1884
New Contributor III

How can I limit number of bars in a chart?

HI !

I want to show only the last 12 months in a bar chart. Is it possible?

Best regards,

Ciro.

1 Solution

Accepted Solutions

Re: How can I limit number of bars in a chart?

You can try using a set analysis expressions to limit the number of months. If you have a date field then you can use something like sum({<MyDate={'>=$(=MonthStart(Max(MyDate),-11))'}>} Value) to calculate the sum of Value using only the date values from the last 12 months.

If you need more help please post a small Qlik Sense app that illustrates the problem.


talk is cheap, supply exceeds demand
5 Replies

Re: How can I limit number of bars in a chart?

You can try using a set analysis expressions to limit the number of months. If you have a date field then you can use something like sum({<MyDate={'>=$(=MonthStart(Max(MyDate),-11))'}>} Value) to calculate the sum of Value using only the date values from the last 12 months.

If you need more help please post a small Qlik Sense app that illustrates the problem.


talk is cheap, supply exceeds demand
reddys310
Honored Contributor II

Re: How can I limit number of bars in a chart?

Hi CIRO,

You can achieve this by an expression as Gysbert mentioned. There is also an alternative to this which can be easier,

In the properties panel, first sort the dimmenion by Months and then set the limitation dropdown to Fixed number and enter in 12 there. This will curtail the output to just last 12 months.

2016-01-25 01_15_51-Qlik Sense Desktop.png

Thanks,

Sangram.

oric1884
New Contributor III

Re: How can I limit number of bars in a chart?

Hi Gysbert!

Thank you for your help.

Best regards,

Ciro.

oric1884
New Contributor III

Re: How can I limit number of bars in a chart?

Hi Sangram!

Thank you for your help.

Your reply is correct too, bud I don't know how mark it as a correct answer.

Best regards,

Ciro.

reddys310
Honored Contributor II

Re: How can I limit number of bars in a chart?

Glad it helped!

Community Browser