Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have some data linked by my Line_Date field to my calendar such as :
My data :
Header_Date | Line_Date (as Calendar_Key) | Data_Key |
20240401 | 20240401 | 1 |
20240401 | 20240405 | 2 |
20240401 | 20240406 | 3 |
20240401 | 20240407 | 4 |
My Calendar :
Calendar_Key | Worked_Day |
<20240401 | ~ |
20240401 | 1 |
20240402 | 1 |
20240403 | 1 |
20240404 | 1 |
20240405 | 1 |
20240406 | 0 |
20240407 | 0 |
20240408 | 1 |
20240409 | 1 |
20240410 | 1 |
20240411 | 1 |
20240412 | 1 |
20240413 | 0 |
20240414 | 0 |
20240415 | 1 |
>20240401 | ~ |
I need to make an aggregate to sum the number of Worked_Day between today and the header date and not the line date.
I closest i got was this but it only work if i have 1 data selected :
Aggr(nodistinct Sum(
{1<
[Calendar_Key]={"$(= '>=' & Date(Aggr(nodistinct Min([Calendar_Key]),[Header Date])) & '<=' & Today() )"}
>}
[Worked_Day])
,[Worked_Day])
Try this
Aggr(
Sum({< [Calendar_Key] = {"$(='>=' & Date(Aggr(Min([Calendar_Key]), [Header_Date])) & '<=' & Today())"} >} [Worked_Day]),
[Header_Date])
Try this
Aggr(
Sum({< [Calendar_Key] = {"$(='>=' & Date(Aggr(Min([Calendar_Key]), [Header_Date])) & '<=' & Today())"} >} [Worked_Day]),
[Header_Date])