Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data like:
Customer ID Delivery Date Sales Man Visit Date (SM Visit Date)
1 01/01/2019 03/01/2019
1 29/01/2019 30/01/2019
1 21/02/2019 23/02/2019
2 17/12/2018 18/12/2018
2 05/01/2019 07/01/2019
My desired output:
C. ID First Delivery Date SM Visit Date Second Delivery Date SM Visit Date Last Delivery Date SM Visit Date
1 01/01/2019 03/01/2019 29/01/2019 30/01/2019 21/02/2019 23/02/2019
2 17/12/2018 18/12/2018 05/01/2019 07/01/2019
try Generic Load
I am assuming you want the output on the UI side.
Use something like below
Dimension - User ID
Measures
First Delviery date - Date(Min([Delivery Date]),'DD\MM\YYYY')
Visit Date - Date(FirstSortedValue([Sales Man Visit Date (SM Visit Date)],[Delivery Date]),'DD\MM\YYYY')
Second Delviery date - Date(Min([Delivery Date],2),'DD\MM\YYYY')
output
Visit Date - Date(FirstSortedValue([Sales Man Visit Date (SM Visit Date)],[Delivery Date],2),'DD\MM\YYYY')
Last Delivery Date - Date(Max([Delivery Date]),'DD\MM\YYYY')
i tried but they were not working
please find the attach data
from the excel you shared the deliverydate is not being recognized correctly as a Date but as a text.
in the excel you shared there is a trailing space after the values in that column. i removed it and it works correctly.
I think you will need to change your source excel somehow. because i tried trim and date functions before removing the trailing spaces it didnt work.
not 100% sure why