Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Get last element/row for all weeks

Hello guys,

 

I am trying to get the Sales for my products for only the last day within the week. Do you have an idea, how I can solve this? I was thinking about creating a temporary table with ADDCOLUMNS or SUMMARIZECOLUMNS and iterating with SUMX over that table. But how can I say: "During the iteration take for every week the last day"?

 

Current Table:

DateWeekProductUnits Sold
04.07.2022W28Amarilla8530
04.07.2022W28Paseo9123
04.07.2022W28Velo9003
05.07.2022W28Amarilla8686
05.07.2022W28Paseo9773
05.07.2022W28Velo8109
06.07.2022W28Amarilla9738
06.07.2022W28Paseo7095
06.07.2022W28Velo8144
07.07.2022W28Amarilla8684
07.07.2022W28Paseo8393
07.07.2022W28Velo7086
08.07.2022W28Amarilla8558
08.07.2022W28Paseo9151
08.07.2022W28Velo8170
09.07.2022W28Amarilla8643
09.07.2022W28Paseo7626
09.07.2022W28Velo8016
10.07.2022W28Amarilla9626
10.07.2022W28Paseo8441
10.07.2022W28Velo7130
11.07.2022W29Amarilla7403
11.07.2022W29Paseo9639
11.07.2022W29Velo7603
12.07.2022W29Amarilla8036
12.07.2022W29Paseo9340
12.07.2022W29Velo9854
13.07.2022W29Amarilla8232
13.07.2022W29Paseo7390
13.07.2022W29Velo9960
14.07.2022W29Amarilla8705
14.07.2022W29Paseo7284
14.07.2022W29Velo8250
15.07.2022W29Amarilla9121
15.07.2022W29Paseo8066
15.07.2022W29Velo8027
16.07.2022W29Amarilla7011
16.07.2022W29Paseo8643
16.07.2022W29Velo9487
17.07.2022W29Amarilla9250
17.07.2022W29Paseo9456
17.07.2022W29Velo8292
18.07.2022W30Amarilla7569
18.07.2022W30Paseo7521
18.07.2022W30Velo7019
19.07.2022W30Amarilla8477
19.07.2022W30Paseo7804
19.07.2022W30Velo9804
20.07.2022W30Amarilla8139
20.07.2022W30Paseo9269
20.07.2022W30Velo7179
21.07.2022W30Amarilla8107
21.07.2022W30Paseo7289
21.07.2022W30Velo8184
22.07.2022W30Amarilla7181
22.07.2022W30Paseo9233
22.07.2022W30Velo8753
23.07.2022W30Amarilla8651
23.07.2022W30Paseo7206
23.07.2022W30Velo8362
24.07.2022W30Amarilla9807
24.07.2022W30Paseo7413
24.07.2022W30Velo7407

 

Expected:

DateWeekProductUnits Sold
10.07.2022W28Amarilla9626
10.07.2022W28Paseo8441
10.07.2022W28Velo7130
17.07.2022W29Amarilla9250
17.07.2022W29Paseo9456
17.07.2022W29Velo8292
24.07.2022W30Amarilla9807
24.07.2022W30Paseo7413
24.07.2022W30Velo7407

 

Thanks for all help!

2 Replies