Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bhargav_bhat
Creator II
Creator II

Showing previous 12 months data in graph on single selection in Month Filter

Hi,

We have a requirement in Qliksense where on selection of any month in month filter it should show previous 12 months data in the graph

for example if we select Jul 2017 it should show from Jul 2016 to  Jul 2017 as shown below

month.PNG

Needed help to acheive this requirement

Regards,

Bhargav

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Is there any challenge you faced using?

Sum({<MonthYear = {">=$(=AddYears(Max(MonthYear), -1)) <=$(=Max(MonthYear))"}>} Sales)

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

View solution in original post

8 Replies
Anil_Babu_Samineni

Is there any challenge you faced using?

Sum({<MonthYear = {">=$(=AddYears(Max(MonthYear), -1)) <=$(=Max(MonthYear))"}>} Sales)

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
sunny_talwar

He might have to make sure that the formatting within the set analysis is right and also make sure to not have spaces between ranges....So what I mean is this

Have this

>=blahblah<=blahblah

Instead of

>=blahblah <=blahblah

pradosh_thakur
Master II
Master II

is there no need of changing to 'MMM YYYY'  format?

Learning never stops.
bhargav_bhat
Creator II
Creator II
Author

Hi Anil,

As per requirement,we do  not  have to sum up the 12 months data . we just need to have data in graph for previous 12 months in graph.The issue is that on selection of a month in month filter it shows data for single month only in graph


Regards,

Bhargav

Anil_Babu_Samineni

May be Only() helps here

Only({1<MonthYear = {">=$(=AddYears(Max(MonthYear), -1))<=$(=Max(MonthYear))"}>} Dimension)

Update - As suggest by sunny

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
sunny_talwar

When you say Month is it the same field as your dimension? which include Month and Year or is this a separate field from MonthYear? Can you share the name of your fields? and the expression you are using right now?

Anil_Babu_Samineni

I believe, He can manage with Format or he will surf in google

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
bhargav_bhat
Creator II
Creator II
Author

Hi Sunny,

Thanks for Replying

The expression is working  fine in the graph


Regards,

Bhargav