Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

month to month

Hi all

i want to show the values for the months of one month before the current month,current month and one month after the current month,

that is if i select jun then i should show the values for may,jun,july months in bar charts...........

can anyone help me....

how to do this

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Please see the attached sample application which is in line with your requirement.

Please revert back for any further query in this regard.

View solution in original post

10 Replies
tresesco
MVP
MVP

Hi,

Probably you are using the MONTH as dimension. If it is so, you may use CALCULATED DIMENSION. make a variable 'PreMaxMonth' to hold the previous month. then use the calculated expression conceptually as : if(MONTH>='PreMaxMonth' and MONTH<PreMaxMonth+3, MONTH)

Along with this one more thing you will have to do, and that is - use SET ANALYSIS {1} to avoid the present selection. Because it would the already done against the dimension.

Hope i could give you some idea. if not clear please upload your application sample.

Regards,

tresesco

Not applicable
Author

hi..

you r right month as the dimension,

can u give me the details clearly...

what is the premaxmonth..

Not applicable
Author

Do you can use a macro for select values in a field.

The idea is that when select June in a field of selection or an input box automatically selected in the field that is used in the table values may, jun and jul

If do you dont know as do it, tell me an prepared a example.

Regards

Not applicable
Author

hi

I dont know how to do this...

also i m not familiar in macros...

can u give me the ideas to develop....

i want to show the sum(sales) in the bar chart regarding the months,

i.e,if i select the month jun,i want to show the values for may,jun,july regarding the company

thanks in advance

Not applicable
Author

Hi,

try using set analysis:

sum({$<Month={'$(#=month(max(Date)))','$(#=month(max(Date))+1)','$(#=month(max(Date))-1)'}>} sales)

regards!

Not applicable
Author

Hi,

Please see the attached sample application which is in line with your requirement.

Please revert back for any further query in this regard.

Not applicable
Author

Hi

thanks for giving information...

its working fine...

if i select two year values r not added...I want to add the values

how to do this.

suppose if i select 2009 and 2010,then month=jun

i want to add 2009 jun and 2010 jun as well as 2009 may,2010 may and 2009 july and 2010 july

thanks in advance

Not applicable
Author

Hi,

Please see the attached modified application. Here we have created a variale called v3Months (which contains current/previous/next month values). Then this variable we are using in our set expression inside the graph. Please refer to Month 2 Month - || (Consolidated across years) graph.

tresesco
MVP
MVP

Hi ,

Though this might not be the best solution, still it would give what you want.

Regards,

tresesco