Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
da_pagnott
Contributor III
Contributor III

Count with condition on Date = yesterday

Hi guys,

I'm filling a table in my dashboard, and I'd like to count, for each user, the number of customers managed yesterday.

I have my column with all the users, and I'm adding a new column with the count (distinct) of the customers, but I can't do it.

  • I have declared yesterday (and it works) as:
Let yesterday=date(firstworkdate(Today()-1, 1)
  • I'm working with my source column DocDta, correctly managed as date values:

Screen1.JPG

  • My customers' list it's like that:

Screen2.jpg

 

I tried many ways but I can't fill my column properly (in the first case I get "-" as result, in the second one I get always 0):

=if(date(DocDta)=yesterday, count(distinct CUSTOMER_ItemDes))
=count({<DocDta={yesterday}>} distinct CUSTOMER_ItemDes)

Thank you very much for your help!

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try like this

=Count({<DocDta = {"$(=yesterday)"}>} DISTINCT CUSTOMER_ItemDes)

or

=Count({<DocDta = {"$(=$(yesterday))"}>} DISTINCT CUSTOMER_ItemDes)

View solution in original post

2 Replies
sunny_talwar

Try like this

=Count({<DocDta = {"$(=yesterday)"}>} DISTINCT CUSTOMER_ItemDes)

or

=Count({<DocDta = {"$(=$(yesterday))"}>} DISTINCT CUSTOMER_ItemDes)
da_pagnott
Contributor III
Contributor III
Author

Hello,

The first one works, thank you!!