Forum Discussion
bradyb2323
Feb 03, 2023Copper Contributor
checking the success of a program by comparing date fields for person IDs
Hello, Looking for help on a large data set. Im trying to assess the success of a program. Essentially I want to look at all records for each person ID, check if a column A string is present in...
rzaneti
Feb 03, 2023Iron Contributor
bradyb2323
Feb 06, 2023Copper Contributor
| Customer Identifier | Rx Number | Most Recent Bill Date | Rx Completed On | Primary Plan Name | Primary Plan Paid Amount | Copay Amount |
| 1234556 | 99996661 | 5/5/2022 | 5/5/2022 | RETAIL | 1147.09 | 15 |
| 1234556 | 99996661 | 5/30/2022 | 6/6/2022 | RETAIL | 1147.09 | 15 |
| 1234556 | 99996661 | 7/11/2022 | 7/11/2022 | RETAIL | 1229.1 | 15 |
| 1234556 | 99996661 | 8/3/2022 | 8/15/2022 | RETAIL | 1229.1 | 15 |
| 1234556 | 99996661 | 9/13/2022 | RETAIL | 0 | 0 | |
| 1234556 | 9995577 | 8/26/2022 | RETAIL | 0 | 0 | |
| 1234556 | 8754 | 11/9/2022 | QSP | 0 | 0 | |
| 1234556 | 8754 | 12/20/2022 | RETAIL | 0 | 0 |
- bradyb2323Feb 06, 2023Copper ContributorI added test data for the purposes of the question. Hopefully this will make things clearer. Looking to group by Customer Identifier (only one shown in data set), check if "QSP" in Primary Plan Name, and if so, check all RxCompletedOn dates that would fall after the Most Recent Bill Date associated with the QSP line.