Hi, the query above excludes all values of Today where the distinct count (dc) of the adjusted _time is 1, meaning they did not exist Yesterday. bin will basically round _time to the day so that only two values are used in your example: yesterday and today. Then evenstats will calculate the dc (distinct count) of _time grouped by EMINO and DPRTM_NAME. If the combined values of EMINO and DPRTM_NAME are different between Yesterday and Today the count will be 2, or if those values only existed yesterday then the count will be 1 but Day will be "Yesterday". If that makes sense. What you are describing below is slightly different to what you posted initially and it's still not 100% clear to me. Can you paste an example in tabular format with the fields involved and what the desired output would be?
... View more