Hi community,
I wanted to ask you for help. My data will have 2 lines for each ID with a unique name and I will need to dynamically check which column has changed(for the same ID) and create a new column with a comment section.
If the column will change we need to use below mapping table to identify which comment add this comment to my output. I can add only one comment so I need to choose the one with the highest priority.
Column with Difference | Comment | Priority |
Trade Date | Trade Date | 1 |
Product | PD | 2 |
Price | Pricing | 3 |
Cost | Cost | 4 |
The truth is I have 16 different comments that I can put so I want to make this dynamic instead of using the formula.
This is the initial input file:
Id | Trade Date | Product | Price | Cost |
ID 1 | 01.01.2020 | ABC | 123 | 222 |
ID 1 | 01.01.2020 | XYZ | 123 | 222 |
ID 2 | 01.01.2020 | ABC | 111 | 123 |
ID 2 | 01.05.2020 | ABC | 111 | 123 |
This is the output:
Id | Trade Date | Product | Price | Cost | Comment |
ID 1 | 01.01.2020 | ABC | 123 | 222 | PD |
ID 1 | 01.01.2020 | XYZ | 123 | 222 | PD |
ID 2 | 01.01.2020 | ABC | 111 | 123 | Trade Date |
ID 2 | 01.05.2020 | ABC | 111 | 123 | Trade Date |
ID 3 | 01.06.2020 | ACD | 122 | 132 | Trade Date |
ID 3 | 01.08.2020 | WRE | 424 | 787 | Trade Date |
Any ideas what would be the best approach for this problem?
Solved! Go to Solution.
Hello @Emil_Kos ,
Will this help you at all?
One thing I should say. It will be useful to put some sort of order whether adding the time to the data or some sort of indication to the correct order of the records.
Hi @ImadZidan,
Thank you very much for that workflow but I need something different.
There is one issue. I have 16 columns like this so I would need to create a formula for each of them.
I was wondering if I can do it more dynamically.
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |