Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Aurél
Creator
Creator

Qlik Sense Sheet Action - selecting multiple values

Hello,

I would like the current year and last year (2022 and 2021) to be automatically selected. I manage to select a year but not 2... how do please?

2022-09-20_09-28-46.png

 

Thank you.

Labels (3)
1 Solution

Accepted Solutions
RafaelBarrios
Partner - Specialist
Partner - Specialist

i see

to your variables, use the '=' sign, so when you call then they are already evaluated

sheet3.PNG

and in the trigger values you can not use just variables names like

='Annee_en_cours;Annee_moins_un'

by doing this qlik will look for exact text inside the field

 

so, you need the variables value and use this instead

='$(Annee_en_cours);$(Annee_moins_un)'

sheet4.PNG

 

best,

View solution in original post

8 Replies
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @Aurél 

Try this

trigger.PNG

Its the same if values are numbers or text

 

hope it helps

best,

Aurél
Creator
Creator
Author

Thanks, but no, that’s not what I want....
The user should not have to click on a button... I'd like to have the 2 years selected when opening the report.
In addition, I can’t enter the values, the 2 years must be dynamic to have the current year and the last year (2022 and 2021), and next year, we will automatically 2022 and 2023.

Thank you!

RafaelBarrios
Partner - Specialist
Partner - Specialist

so, same way i did with the button but in the sheets properties

my data:

load * inline [
year, city, value
2020,Caracas,100
2021,Carcas,200
2021,Paris,300
2022,Berlin,300
2022,Madrid,400
];

sheet1.PNG

With value ='$(=max(year)-1);$(=max(year))'

and when the sheet opens

sheet2.PNG

Aurél
Creator
Creator
Author

It doesn’t work.... no year is selected

RafaelBarrios
Partner - Specialist
Partner - Specialist

please copy here the following:

1. the expression used as value

2. a filter screenshot with all values for the year field  (not the master dimension)

3. the name of the year field in the table (not the master dimension)

4. if master dimension has a formula paste it also

 

Best,

Aurél
Creator
Creator
Author

1. ='Annee_moins_un;Annee_en_cours'

1.png

1.png

 

2. 

2.png

 

3.

3.png

 

Thank you :-).

RafaelBarrios
Partner - Specialist
Partner - Specialist

i see

to your variables, use the '=' sign, so when you call then they are already evaluated

sheet3.PNG

and in the trigger values you can not use just variables names like

='Annee_en_cours;Annee_moins_un'

by doing this qlik will look for exact text inside the field

 

so, you need the variables value and use this instead

='$(Annee_en_cours);$(Annee_moins_un)'

sheet4.PNG

 

best,

vinieme12
Champion III
Champion III

Choose Action "Toggle field values"   instead

Value = ($(=var1)|$(=var2))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.