How can I get the first time of the data that got sold and also last time that got a sold in a day.
I want to get the first time and last time of that the agent sold per day.
-
Hi Master Yoda,
This sounds like a modelling challenge,
Assuming this information is coming from the same table, (if not you could achieve it with another step in between)
You could create a custom column which concats the [Agent] and [Date] (without timestamp)
Then add 2 custom columns, with the SORTASC([Agent+date],[timestamp])
And another one with the same with SORTDESC([Agent+date],[timestamp])
Then select only the rows which have 1 values, this will give you the first and last time that agent sold that day.
Another way would be to translate these timestamps into INT and get the max/min for each agent for each day,
Let me know if you'd like any further clarification or if you'd like to discuss on a quick call,
We're always here to help,
"Always pass on what you have learned" -Yoda
-
Hi Ido,
Thanks for your help. Can you elaborate more on how to concat the agent and date ? should the date will be string ? I already extracted the date from the timestamp by using the createdate but when I concat it. It showed an error that says the fuction concat is not declared.
Please sign in to leave a comment.
Comments
2 comments