Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi every boday,
ive been stuck with this problem for three days and
as you can see in the attached picture i have a graphic table , <nom vendeur> is the dimension and i'm making expressions with the rest of fields ,
the application counts the <ca par jour> correctly but my problem is the number of distinct clients per day and month, it always gives me the distinct total number of clients
here is my expressions
=count( {$ <"$(=num(day(today())))"="$(=num(day([Date CA])))"> }distinct [Nom Client] ) --->distinct number of clients pe day
=count( {$ <"$(=num(month(today())))"="$(=num(month([Date CA])))"> }distinct [Nom Client] ) --->distinct number of clients pe month
for other informations just comment
thanks
Zeid,
i would try:
§ =count( { $ <[Date CA]={"$(=today())"}> } distinct [Nom Client] )
Check also the date format that can hurt set analysis. Chech that [Date CA] was populated with the same format as the one used with today.
One last thing : set analysis and dates have a difficult relationship
Try with their numeric representaion:
§ =count( { $ <[Date CA]={"$(=num(today()) )"}> } distinct [Nom Client] )
Fabrice
You cannot have an expression to the left of the equal sign inside the set modifier. I.e. the following does not work:
=count( {$ <"$(=num(day(today())))"="$(=num(day([Date CA])))"> } ...
Instead you should use something like:
=count( {$ <[Date CA]={"$(=num(day(today())))"}> } ...
HIC
i see the problem right now , but the field [Date CA] is a date and $(=num(day([Date CA]))) is calculating the day number ,how can i compare [date ca] and today() ? i tried many versions but it gives me 0 result
Zeid,
You must remove the day() function. I assume that "Date CA" is a real date: so you can compare to today() directly. day(Today()) will return the day number within the month: from 1 to 31.
And take care that today() according to the last argument, may return the date the document was opended (not necessarily today)
I have published a document on set analysis: http://community.qlik.com/docs/DOC-4889
The english version: http://community.qlik.com/docs/DOC-4951
Hope this helps
Fabrice
Mr aunez,
i already have your document and it helped me a lot ,thank you
but concerning my problem here is some of the expressions i had used
=count( { $ <[Date CA]={"$(today())"}> } distinct [Nom Client] )
=count( { $ <[Date CA]={"$(now())"}> } distinct [Nom Client] )
but no result
just for informations i already compared dates in if statement and it worked well
=num(((SUM(IF (Date([Date CA])=Date(Today()), [CA],0)))),'# ##0','.',' ')
Hi , try this
=count({<day(date)={'$(Vtoday)'}>}distinct [Nom Client])
Here Vtoday Variable contains =day(Today)
Hope it helps
Zeid,
i would try:
§ =count( { $ <[Date CA]={"$(=today())"}> } distinct [Nom Client] )
Check also the date format that can hurt set analysis. Chech that [Date CA] was populated with the same format as the one used with today.
One last thing : set analysis and dates have a difficult relationship
Try with their numeric representaion:
§ =count( { $ <[Date CA]={"$(=num(today()) )"}> } distinct [Nom Client] )
Fabrice
thank you veryyyy much mr aunez you really made my day
You are wellcome
Fabrice