Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggrégation somme et variables dynamiques

Bonjour à tous,

Voici une petite formule avec des valeurs « en dur » :

=sum({$ <ANNÉE= {2012,2013}, MOIS={août, sept., oct.}>} div(EFF_NB_HEURES,1))

Je souhaite remplacer 2012, 2013 par MinString(ANNÉE) et MaxString(ANNÉE), ainsi que août, sept., oct. par MinString (MOIS) MaxString(MOIS) car ce sont des critères de sélection pour mes calculs.

Mais ça ne marche pas, c'est une syntaxe qui ne semble pas plaire à QlikView…

Avez-vous une idée ? Merci d'avance.

12 Replies
Not applicable
Author

I would like to perform the calculations in the table on the right, and in the fields below. I would replace the constant values ​​(2012 2013 Aug Sept Oct) by expressions so that the calculation is done automatically when the selection of the month and the year change.

Nicole-Smith

=sum({$<ANNÉE={'>=$(=Min(ANNÉE))<=$(Max(ANNÉE))'},MOIS={'>=$(=Min(MOIS))<=$(Max(MOIS))'}>} div(EFF_NB_HEURES,1))

Not applicable
Author

I wrote something not bad :

=Round((((sum({$<DATE_ANNEE = {$(#=NumMax(Num#(MinString(DATE_ANNEE)), Num#(MaxString(DATE_ANNEE))))}>} EFF_NB_HEURES)/8)-(sum({$<DATE_ANNEE = {$(#=NumMin(Num#(MinString(DATE_ANNEE)), Num#(MaxString(DATE_ANNEE))))}>} EFF_NB_HEURES)/8))/(sum({$<DATE_ANNEE = {$(#=NumMin(Num#(MinString(DATE_ANNEE)), Num#(MaxString(DATE_ANNEE))))}>} EFF_NB_HEURES)/8))*100,0.01)&' %'

I'm sure it could be shorter, but it works !

Thanks for all