Hi,
How can I sum for each week like below?
Name | 2023_01_02 | 2023_01_03 | 2023_01_04 | 2023_01_05 | 2023_01_06 | 2023_01_09 | 2023_01_10 | 2023_01_11 | 2023_01_12 | 2023_01_13 |
Louis Stevens | 1.1 | 1.1 | 1.1 | 1.1 | 1.1 | 2 | 2 | 2 | 2 | 2 |
expected output | ||||||||||
Name | 2023_01_02 | 2023_01_09 | ||||||||
Louis Stevens | 5.5 | 10 |
Thanks.
@wonka1234 Can you please provide sample raw data, not crosstab :-) ?
@albert_alaluf hows this?
Name | Dates | placeholder |
Louis Stevens | 1/2/2023 | 1.1 |
Louis Stevens | 1/3/2023 | 1.1 |
Louis Stevens | 1/4/2023 | 1.1 |
Louis Stevens | 1/5/2023 | 1.1 |
Louis Stevens | 1/6/2023 | 1.1 |
Louis Stevens | 1/9/2023 | 0 |
Louis Stevens | 1/10/2023 | 0 |
Louis Stevens | 1/11/2023 | 0 |
Louis Stevens | 1/12/2023 | 0 |
Louis Stevens | 1/13/2023 | 0 |
Louis Stevens | 1/2/2023 | 0 |
Louis Stevens | 1/3/2023 | 0 |
Louis Stevens | 1/4/2023 | 0 |
Louis Stevens | 1/5/2023 | 0 |
Louis Stevens | 1/6/2023 | 0 |
Louis Stevens | 1/9/2023 | 2 |
Louis Stevens | 1/10/2023 | 2 |
Louis Stevens | 1/11/2023 | 2 |
Louis Stevens | 1/12/2023 | 2 |
Louis Stevens | 1/13/2023 | 2 |
perfect, working on it.
I made some search, and I found another solution. I just implemented to yours. I don't deserver full credit :-)
Please marked as a solution if this helps.
@albert_alaluf not quite the output looking for.. looking for it to be like this
expected output | ||||||||||
Name | 2023_01_02 | 2023_01_09 | ||||||||
Louis Stevens | 5.5 | 10 |
Hi Binuacs,
Could you please explain the formula on what it does please.
IIF(isNull([Row-1:RecordID]),1,
IIF(Mod([Row-1:RecordID],5)=0,[Row-1:ID]+1,[Row-1:ID]))