Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the follwing situation. I have a SQL data source with Sale details. Every time you edit a sale, the previous record of the sale is moved to a History table.
My first goal is to calculate how many days a sale record has been in a particular stage / probability phase.
In the history table I have a column "Updated". This shows me the date the record was updated.
I think I need this column to calculate the days between the different probability phases of a sale record.
But I don't know how and where to begin.
Anyone got some suggestions?
Hi, I use the "previous" function to calculate cumulated elapsed days between events by contact. It may help you :
duration:
load
ID_EVENT,
ID_CONTACT,
EVENT_DATE,
if(ID_CONTACT<>previous(ID_CONTACT),0,EVENT_DATE-Previous(EVENT_DATE)) as ELAPSED_DAYS
resident events
order by
ID_CONTACT,
EVENT_DATE
;
Hi, I use the "previous" function to calculate cumulated elapsed days between events by contact. It may help you :
duration:
load
ID_EVENT,
ID_CONTACT,
EVENT_DATE,
if(ID_CONTACT<>previous(ID_CONTACT),0,EVENT_DATE-Previous(EVENT_DATE)) as ELAPSED_DAYS
resident events
order by
ID_CONTACT,
EVENT_DATE
;
Thanks Yves,
I will give it a try. I will let you know if it has done the job for me in that way.
That did the job for me! Thx