Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have set of dates field and want to derive the average of the days. below is the set of values for the date field (ordered date and requisition date), I need the difference of the 2 dates (as shown below) and the average for the same.
[PO-P&I]Ordered Date (Date) | [REQ]Requisition Date (Date) | Diff |
2/23/2021 | 1/14/2021 | 40 |
1/11/2022 | 1/10/2022 | 1 |
12/12/2022 | 12/1/2022 | 11 |
11/22/2021 | 11/18/2021 | 4 |
9/21/2022 | 9/5/2022 | 16 |
4/30/2021 | 4/26/2021 | 4 |
4/30/2021 | 4/26/2021 | 4 |
12/12/2022 | 12/5/2022 | 7 |
3/31/2020 | 3/30/2020 | 1 |
Can u please show me exactly what you are going to see the output???
// Load the data
Data:
LOAD [PO-P&I]OrderedDate,
[REQ]RequisitionDate,
Interval([PO-P&I]OrderedDate - [REQ]RequisitionDate, 'DD') as Diff;
// Calculate the average number of days
LET AvgDays = Avg(Diff);
// Display the result
Trace 'Average number of days: ' & AvgDays;