Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

No effect of Year and Month selection on Chart, with last 12 months data

Hi...

How can I show last 12 months with no effect of Year and Month Selection on chart, but the other filters can be selected...

Please help with the doubt....

Regards,

Kavita

6 Replies
Not applicable

Hi Kavita,

you'll want to use set analysis within your expression for this.

Have a look at this for a good explanation of it.

http://community.qlik.com/docs/DOC-4951

if you need further help, post up an example app and can take a look

hope that helps

Joe

robert_mika
Master III
Master III

Could you share your data/file?

timanshu
Creator III
Creator III

Hi,

Suppose you want to calculate sum of sales,

then define a variable vPrev12MonthDate = Date(Addmonths(Date,-12))


then in expression of chart write:

Sum({<Date ='>=$(=vPrev12MonthDate)<=Date',Month=,Year=,Quater=>}Sales).

Anonymous
Not applicable

... or you could manually make the selection for the last 12 months, and then lock the selection.

timanshu
Creator III
Creator III

Hi,

First of all, How can you select last 12 months. suppose date is 6 june 2014,

how will you select data from 7 june 2013 to 6 june 2014 ??

Second , if selection is made , then that will affect other reports, which anyone wouldn't demand.

Third,

If on every row of a chart, we need to calculate according to date in that row, then this solution will not work.

Do you agree with this ?

kavita25
Partner - Specialist
Partner - Specialist
Author

Hi...

The below expression worked for me...

=Count({<DATE={'>=$(=MonthStart(Max({1}DATE),-11))<=$(=MonthEnd(Max({1}DATE)))'},FMonth=,FYear=>}Customer)

Regards,

Kavita