Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have ID, Start Date, End Date.
I need to show the maximum average number of days between start date and end date in a text box.
I already know how to calculate individual average # of days between Start and End dates using
aggr(avg((date( [Start Date]- [End Date]))),ID)
I need to show the highest value of this expression (Highest avg days) in a textbox
Hello, I created some test data with the solution, confirm if it is what you need:
Data:LOAD * INLINE [ID, StartDate, EndDate1, 2023-01-01, 2023-01-052, 2023-02-01, 2023-02-103, 2023-03-01, 2023-03-054, 2023-04-01, 2023-04-205, 2023-05-01, 2023-05-15];
Measure:
max(aggr(avg(Date([EndDate]) - Date([StartDate])), ID))
Image:
Regarts.