I'm doing a saved search and I'm trying to get a s...
# general
c
I'm doing a saved search and I'm trying to get a summary report by Sales Rep that outlines the name then the sum of the counts if the last activity day is less than 3 days and another for more than 3 days. It works when I have other groupings like doc id and stuff, but when I do just the sales rep it doesn't like my formula and gives me incorrect results. It’s probably because the max of last modified date isn’t accurately calculating with just the sales rep, Any idea how I could get this to work CASE WHEN max({today}) - trunc(max({activity.lastmodifieddate})) <= 3 THEN count(distinct({transactionnumber})) ELSE NULL END
a
This is not how I would do this. You can just make a regular summary search with 3 columns. 1 is the sales rep which will be group. The other two would use the count function. Using the datediff, i'd use one column to show transactions that are within 3 days and one that shows more.
you'll get 3 column results, sales rep, # of transactions in the last 3 days, and # of transactions beyond 3 days
c
@AK47 so I did sales rep - group Fórmula - count - case when datediff(day,{today},{activity.lastmodifieddate} < 3 then 1 end My results were Rep A - 1 Rep B - 1 Which is incorrect, I need a sum of the count for all the tasks with the max of the modifieddate
a
@Clint don't do THEN 1, then each result is getting 1 and it will only count 1. Do THEN {internalid} or document number or something. Then this will work
❤️ 1