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

num aggregation inside count

Hi everybody ,

i stuck for 2 days, i want to do a num aggregation inside a count but it didn't work

here is my expression

=count( {$ <4={" num(day(today())) "}> }  [Nom Client])

thanks in advance.

14 Replies
Not applicable
Author

and dates are not integer

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Indeed, it is just returning the total number of clients that made at least one order today. And today will only change after midnight. Every selection apart from those in field [Date CA] will influence the outcome of this expression.

If you want it to be tuned for a particular behavior, please post your requirements or submit an example document.

Peter

Not applicable
Author

im very gratful mr peter for your time

here is another exemple whene im counting clients who hade made at least one commande in the current month

=count( {1 <"$(=num(month(today())))"="$(=num(month([Date CA])))"> } distinct [Nom Client])

but the problem it always give me the same result as the other expression

Peter_Cammaert
Partner - Champion III
Partner - Champion III

THe left hand side of a Set Modifier has to be a field name. In your script, make sure that you have fields like [Date CA Mois] and [Date CA Année Mois] in addition to the base field [Date CA].

Imagine that the new field [Date CA Année Mois] contains values like '2014-02', then you can write an expression like this to obtain the correct count.

=count(  {1 <[Date CA Année Mois]="$(=date(today(), 'YYYY-MM'))"> } distinct [Nom Client])

BTW for the first case I have a working example in attachment.

Good luck,

Peter

Not applicable
Author

thank you very much peter