Hi Guys,
I am stuck with the logic of the latest month in the quarter. So I want to show sales of the latest available month in a quarter including the past data. My Sample data (see month column only looks like this. e.g.
1. For Q4'22 , the flag would be 1 for Dec'22 and 0 for the other 2 months since we have Dec data.
2. For Q2'23, the flag would be 1 for May'23 and 0 for Apr'23 since we have data only till May'23
MONTH | Qtr Flag (Desired Output) |
10/1/2022 | 0 |
11/1/2022 | 0 |
12/1/2022 | 1 |
1/1/2023 | 0 |
2/1/2023 | 0 |
3/1/2023 | 1 |
4/1/2023 | 0 |
5/1/2023 | 1 |
Thanks,
Anuj
Solved! Go to Solution.