Hi All,
Need help in getting the below problem solve. I have below table where Previous day and Current day data are available. Now, my requirement is to know the daily movement on intercompany level. Please note that all the inter company will not be available everyday.
Input data
IC | Profit Centre | Currency | Hedge Trax | Sales | Data |
2509 | 1111 | USD | No | 1000 | 8/19/2023 |
7501 | 2222 | USD | Yes | 2000 | 8/19/2023 |
7890 | 3333 | USD | Yes | 3000 | 8/19/2023 |
8712 | 4444 | USD | Yes | 400 | 8/19/2023 |
7501 | 2222 | USD | No | 500 | 8/20/2023 |
7890 | 3333 | USD | Yes | 650 | 8/20/2023 |
8712 | 4444 | USD | No | 500 | 8/20/2023 |
6767 | 5555 | EUR | Yes | 550 | 8/20/2023 |
My Required Output :-
IC | Profit Centre | Currency | Hedge Trax | Sales | Data | IC | Profit Centre | Currency | Hedge Trax | Sales | Data | Daily Movement |
2509 | 1111 | USD | No | 1000 | 8/19/2023 | 1000 | ||||||
7501 | 2222 | USD | Yes | 2000 | 8/19/2023 | 7501 | 2222 | USD | No | 500 | 8/20/2023 | 1500 |
7890 | 3333 | USD | Yes | 3000 | 8/19/2023 | 7890 | 3333 | USD | Yes | 650 | 8/20/2023 | 2350 |
8712 | 4444 | USD | Yes | 400 | 8/19/2023 | 8712 | 4444 | USD | No | 500 | 8/20/2023 | -100 |
6767 | 5555 | EUR | Yes | 550 | 8/20/2023 | -550 |
Thank you in advance.
Solved! Go to Solution.
Hi @akumar2609 , here's how I'd go about this:
Workflow is attached for you tot take a look at, hope it helps!
Hi @akumar2609 , PFA the solutions that can help you with the problem. Only thing I see is for IC 6767 you have given Daily movement as -550. Since last day there are no sales but 550 should also work right here? Since like it is opening on 20th otherwise you might not calculate the movement correctly for next day.
Thank you for the help.
One more help needed here
I have a date column and I need 'Current day' or 'previous date' text based on the dates in a new column.
Input
Date |
18-Aug-23 |
18-Aug-23 |
19-Aug-23 |
20-Aug-23 |
20-Aug-23 |
Required Output
Date | Current or Previous Day |
18-Aug-23 | Other Day |
18-Aug-23 | Other Day |
19-Aug-23 | Previous Day |
20-Aug-23 | Current Day |
20-Aug-23 | Current Day |
Thank you for the help.
One more help needed here
I have a date column and I need 'Current day' or 'previous date' text based on the dates in a new column.
Input
Date |
18-Aug-23 |
18-Aug-23 |
19-Aug-23 |
20-Aug-23 |
20-Aug-23 |
Required Output
Date | Current or Previous Day |
18-Aug-23 | Other Day |
18-Aug-23 | Other Day |
19-Aug-23 | Previous Day |
20-Aug-23 | Current Day |
20-Aug-23 | Current Day |
@akumar2609 What is the logic to calculate Other Day and Previous Day
What ever the latest date is available should be Marked as "Current date" (in this case 20 Aug is the latest date and will be Marked as Current date). Second latest date should be marked as "Previous day" (in this case 19 Aug) and other then these two, all the dates should be marked as "Other dates" or it can be left blank also.
I am only consent with the latest two dates (in this case 20th and 19th Aug).
@akumar2609 Didn't quite follow your logic in the last one, use this instead:
Thanks for the quick reply; however I can see one catch here. In case My dates are
20th Aug
18th Aug
17 Aug and so now..
Workflow will produced the following result
20th Aug - Current Date
18th Aug - Other Day
17 Aug - Other day
My requirement here is to have the latest two dates available should be Marked as Current and Previous day.