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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
AlbanMONTBILLIARD
Contributor II
Contributor II

Count with 2 parameters in a age structure

I tried to make an age structure (pyramide des ages in french) but i have more result in it than i want. 

The expression than i use is 

count({<SEX={"M"}>+<MONTH="202008">}SEX)

but the result contain all the men in all the month.

Where are my error ?

 

Thanks for you're help

1 Solution

Accepted Solutions
Taoufiq_Zarra

@AlbanMONTBILLIARD  May be :

=count({<SEX={"M"}, MONTH={"$(=Max(MONTH))"}> } SEX)

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

8 Replies
edwin
Master II
Master II

try it with a comma:

count({<SEX={"M"}>,<MONTH="202008">}SEX)

Taoufiq_Zarra

@AlbanMONTBILLIARD 

avec le plus dans Set si la condition Sex=M est Ok donc pas besoin d'aller plus dans le Set analyisi (si la syntaxe est ok aussi)

si j'ai bien compris tu as besoin de :

count({<SEX={"M"}, MONTH={"202008"}> } SEX) , sinon est ce que tu peux partager un exemple de data avec ce que tu souhaite comme output ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Kushal_Chawda

@AlbanMONTBILLIARD  try below 

count({<SEX={"M"},MONTH={"202008"}>}SEX)

AlbanMONTBILLIARD
Contributor II
Contributor II
Author

Thanks a lot. That's good

AlbanMONTBILLIARD
Contributor II
Contributor II
Author

I try to extend the problem and remplace "202008" by max(month) but that not match. Why ?

sunny_talwar

Try this

Count({<SEX = {"M"}, MONTH = {"$(=Max(MONTH))"}>} SEX)
Taoufiq_Zarra

@AlbanMONTBILLIARD  May be :

=count({<SEX={"M"}, MONTH={"$(=Max(MONTH))"}> } SEX)

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
AlbanMONTBILLIARD
Contributor II
Contributor II
Author

Thanks a lot you two. You're the best