Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a scenario where if the value of ID change from Yes(last month) to No (current month) then its status is yes.
I have created the mapping table for the same & perform the applymap after performing the group by using ID and month & order by ID and timestamp
I want to calculate the single status of ID for particular month,but we are getting double status for same ID
ID | Month | Value | Status | TimeStamp |
111 | Jul-17 | No | F | 7/13/2017 11:05 |
111 | Jul-17 | No | T | 7/12/2017 11:46 |
111 | Jun-17 | Yes | F | 6/8/2017 11:34 |
111 | May-17 | Yes | F | 5/1/2017 16:00 |
111 | May-17 | Yes | F | 5/2/2017 16:00 |
111 | May-17 | Yes | F | 5/3/2017 16:00 |
111 | May-17 | Yes | F | 5/4/2017 16:00 |
111 | May-17 | Yes | F | 5/5/2017 16:00 |
111 | May-17 | Yes | F | 5/8/2017 16:00 |
111 | May-17 | Yes | F | 5/9/2017 16:00 |
111 | May-17 | Yes | F | 5/10/2017 16:00 |
111 | May-17 | Yes | F | 5/10/2017 17:06 |
Required output
ID | Month | Value | Status | TimeStamp |
111 | Jul-17 | No | T | 7/13/2017 11:05 |
111 | Jun-17 | Yes | F | 6/8/2017 11:34 |
111 | May-17 | Yes | F | 5/1/2017 16:00 |
111 | May-17 | Yes | F | 5/2/2017 16:00 |
111 | May-17 | Yes | F | 5/3/2017 16:00 |
111 | May-17 | Yes | F | 5/4/2017 16:00 |
111 | May-17 | Yes | F | 5/5/2017 16:00 |
111 | May-17 | Yes | F | 5/8/2017 16:00 |
111 | May-17 | Yes | F | 5/9/2017 16:00 |
111 | May-17 | Yes | F | 5/10/2017 16:00 |
111 | May-17 | Yes | F | 5/10/2017 17:06 |
Not sure I understand the need for Mapping Table? What exactly are you doing with it? Also, I am not sure I understand the output you are looking to get.... Can you explain the logic?
Hi Shweta,
I believe this may be what you are trying to do?
Using the previous function you can do the comparison, however i would be careful of 2 points
1 - the start of the file as this will always be null so you will need to default it
2 - the ordering of the data i.e. you may need to change the ordering of the data from the source to get the grouping correct when you have multiple id's and also nest the previous function on the id's to cope with when they change in the data.
Hope this helps
Ta Paul
please the required output sheet