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: 
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.

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Change " num(day(today())) " into "$(=num(day(today()))) "

Best,

Peter

View solution in original post

14 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

In a set analysis expression you must use a field name on the left side of the comparison. So if 4 is not a field name replace it with something that is. Something like: =count( {$ <MyDayNumber={"$(=num(day(today())))"}> }  [Nom Client])


talk is cheap, supply exceeds demand
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Change " num(day(today())) " into "$(=num(day(today()))) "

Best,

Peter

Not applicable
Author

i tried both and it works but the result is not correct

what im trying to do is obtaining total commands of today for distinct clients

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

MK_QSL
MVP
MVP

What is Total Commands? Is it a field?

Not applicable
Author

sorry i made a mistake , a client can get many commands but i want to get number of distinct clients for to day who has made commands , nom client and date ca are fields

thx

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You should have an OrderNumber and an OrderDate somewhere. If I read your requirement correctly, the following should do:

=count({<OrderDate={"$(=today())"}>} distinct OrderNumber)

Change my fieldnames in yours. Then put this expression in a Straight table and add CustomerName as dimension.

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

How about this:

=count(aggr(count({<[Date CA]={"$(=today())"}>} OrderNumber), [Nom Client]))


Replace OrderNumber with the correct field name.

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Or maybe even simpler?

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

Best,

Peter

Not applicable
Author

it gives me the same result for day,month and total clients, so it not making selections