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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Make a dynamic accumulation

Hello

I have a question regarding accumulation. What I am trying to do is to calculate a accumulation based on whatever dates the user chooses for some locations. So if a user chooses the date 2010-03, the accumulation is from a startdate to 2010-03 and showed for all the locations and for all dates inbetween startdate and 2010-03. So the graph would look something like this. The numbers showed are number of sales.

Date

Location 2010-01 2010-02 2010-03

Place A 13 28 50

Place B 16 25 62

Anyone got any clues? I was thinking that set analysis would do the trick by setting the Date dimension to all the previous Date-dimensions, kinda like $<Date={<=Date}> but could not get it to work.

1 Solution

Accepted Solutions
Not applicable
Author

Hello WorkWork,

don't know how your users choose the EndMonth. I assume they select a single value from a Date(EndMonth)Listbox and then your chart(s) shall show a date-range from a given vStartMonth (ie. as a variable, set during load and (or) set via input box) up to the choosen EndMonth. In this case your expression should look like this:

=sum( {<EndMonth = { "$(= ' <=' max(EndMonth) & ' >=' & vStartMonth)" } >} Value)


Note: expr. is not syntax-checked.

Regards, Roland

View solution in original post

2 Replies
Not applicable
Author

Hello WorkWork,

don't know how your users choose the EndMonth. I assume they select a single value from a Date(EndMonth)Listbox and then your chart(s) shall show a date-range from a given vStartMonth (ie. as a variable, set during load and (or) set via input box) up to the choosen EndMonth. In this case your expression should look like this:

=sum( {<EndMonth = { "$(= ' <=' max(EndMonth) & ' >=' & vStartMonth)" } >} Value)


Note: expr. is not syntax-checked.

Regards, Roland

Not applicable
Author

Thank you! Worked like a charm after some syntax fix.