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

Multiple Values for a Single Variable

Hi

Possibly I am heading down the wrong road and I bow to the knowledge of the many wiser (more experienced) people.

I have a waterfall chart that assesses year on year revenue performance. In January I used Let vMonth = 'Jan' and all bar offsets worked as expected.

In February I used  Let vMonth = 'Jan' .... and there it went wrong. I need to capture both Jan and Feb.

Is this possible through variables or some other smarter method to capture Jan and Feb and later months all months to October for example?

Many thanks

Rob

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Here is an example how to get the list of month names from the year start to the current date
=concat({<Date={"$(= '>=' & makedate(year(today())) & '<=' & date(today()))"}>} distinct Month, ',')

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

A variable contains only a value but this value can be a string where you store more than one information.

Add to your document the selection object and select more than one month, the string contains months and you may set a variable with that value

Hope it helps

Carlos_Reyes
Partner - Specialist
Partner - Specialist

If you're defining your variable in the script then I think you're placing a static value on it... so... perhaps you need to use a formula that is recalculated on every click. The only thing I can think of...and if you need to have all Month names in that variable... why don't you use the Concat function to define it?

=Concat (Distinct Month, ',')

Check the QlikView Help (F1) for more details about this function.

Anonymous
Not applicable
Author

Here is an example how to get the list of month names from the year start to the current date
=concat({<Date={"$(= '>=' & makedate(year(today())) & '<=' & date(today()))"}>} distinct Month, ',')

Not applicable
Author

As always with Qlikview (which is why I like it so much) more than one solution to a problem.

Thanks for the guidance much appreciated - and now have a working app (again).