Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have the following table:
Article | Date | week_no | Number article |
1101 | 05/04/2023 | 14 | 1 |
1101 | 06/04/2023 | 14 | 1 |
1123 | 05/04/2023 | 14 | 1 |
1123 | 06/04/2023 | 14 | 1 |
1515 | 05/04/2023 | 14 | 1 |
1515 | 06/04/2023 | 14 | 1 |
8087 | 05/04/2023 | 14 | 1 |
8087 | 06/04/2023 | 14 | 1 |
7896 | 45033 | 15 | 1 |
7896 | 45034 | 15 | 1 |
8585 | 45033 | 15 | 1 |
8585 | 45034 | 15 | 1 |
7412 | 45033 | 15 | 1 |
7412 | 45034 | 15 | 1 |
I want to sum the articles by taking the max date and grouping by week number.
I know it is possible to do it in script but I want to do it in set analysis.
thank you in advance for your help
Sum(If(Date=Aggr(NODISTINCT Max(Date), week_no),[Number article]))
Hi, try with
Sum( aggr( Sum({<Date={'$(=Max(Date))'}>} [Number articule]),week_no))
Hello @jmartineze ,
I tried your solution however I have the impression that there is a problem with "Sum({<Date={'$(=Max(Date))'}>} " .
The expression returns 0.