Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to find the last store someone purchased from.
I use the following expression and I expect one store name to be returned. However, in some cases I get two or more.
concat({<Accumulator_Type={'RETAIL'}, [Order_Date.autoCalendar.Date]={"=max([Order_Date.autoCalendar.Date])"}>}distinct Order_Channel_Name)
Can you help?
George
Your expression correct...
=concat({<OrderDate={"=max(OrderDate)"}>}distinct DivisionName, ', ')
Thanks for your answer
This will just add a comma between values. I don't want that. I want to make sure only one store name is returned.
Like this ??
=SubField(concat({<OrderDate={"=max(OrderDate)"}>}distinct DivisionName,','), ',', 1)
Thanks again
I tried this and it takes the first of the "list" that concat creates I want to make sure that concat returns only one value. I try this with max(Date) because it means that no customer can make a purchase in the same day in two different stores. However, I still get two or more stores per person for max(date) being the last purchase date
can you share sample data ??
Unfortunately no