Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
lessassy
Creator
Creator

Use multiple values in Month Variable (Rolling Months)

Hello everyone.

 

I have created 12 variable to express the range of month

vMoisCumul1 = '01'

vMoisCumul2 = '01','02'

....

vMoisCumul12 = '01,'02'....'11','12'

 

I have created another compilated variable which iscalled vMoisCumulTotal

If(Mois = 01,'$(=vMoisCumul1)',
If(Mois = 02,'$(=vMoisCumul2)',
If(Mois = 03,'$(=vMoisCumul3)',
If(Mois = 04,'$(=vMoisCumul4)',
If(Mois = 05,'$(=vMoisCumul5)',
If(Mois = 06,'$(=vMoisCumul6)',
If(Mois = 07,'$(=vMoisCumul7)',
If(Mois = 08,'$(=vMoisCumul8)',
If(Mois = 09,'$(=vMoisCumul9)',
If(Mois = 10,'$(=vMoisCumul10)',
If(Mois = 11,'$(=vMoisCumul11)',
If(Mois = 12,'$(=vMoisCumul12)',0
))))))))))))

What i want is use the variable vMoisCumulTotal in a set analysis

When i use a simple set analysis like this one (My qlik sense application has the Month Filter = 02 and Year = 2020 selected):

SUM({<Year = {'$(=vCurrentYear)'} ,Mois = {$(=vMoisCumulTotal)}>}TAUX_DEPART_CDI)

But i have the error : "Error in set modifier ad hoc element list: ',' or ')' expected"

eror qlik sense.PNG

Anyone could help ?

Thanks 

Labels (2)
2 Replies
lessassy
Creator
Creator
Author

Anyone ?

 

lessassy
Creator
Creator
Author

UP