Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I Have below table where i am trying to identify monthly subsequent users.
Logic for subsequent users is All those users present in jan ,check if they are available in Succeeding months.
Logic for Feb is also same but the month to display should start from Jan as shown in below table.
Source Table.
Date | UserID | active flag |
1/1/2024 | a | Y |
1/2/2024 | b | Y |
1/3/2024 | c | Y |
1/4/2024 | d | Y |
1/5/2024 | e | Y |
1/6/2024 | f | Y |
1/7/2024 | g | Y |
1/8/2024 | h | Y |
1/9/2024 | i | Y |
1/10/2024 | j | N |
1/11/2024 | k | Y |
1/12/2024 | l | Y |
2/1/2024 | a | N |
2/2/2024 | b | Y |
2/3/2024 | c | Y |
2/4/2024 | d | Y |
2/5/2024 | e | Y |
2/6/2024 | f | Y |
2/7/2024 | g | Y |
2/8/2024 | h | Y |
2/9/2024 | i | Y |
3/1/2024 | a | Y |
3/2/2024 | b | Y |
3/3/2024 | c | Y |
3/4/2024 | d | Y |
3/5/2024 | e | Y |
I want to display Output table in pivot as well.
Output table.
OutPut | ||
Month Year | Month | Output |
Jan 2024 | Jan | 11 |
Jan 2024 | Feb | 8 |
Jan 2024 | Mar | 5 |
Feb 2024 | Jan | 8 |
Feb 2024 | Feb | 4 |
Mar 2024 | Jan | 5 |
Result in Pivot Table
|
|||
Month | |||
MonthYear | Jan | Feb | Mar |
Jan 2024 | 11 | 8 | 5 |
Feb 2024 | 8 | 4 | |
Mar 2024 | 5 |
Could someone please help me On this.
Thanks in Advance.