The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have a table with two columns, "Date" and "NDC". I am trying to figure out a way to determine when an NDC is added or removed based on the previous date. The list is updated randomly, so the previous date could be a day, week, or month prior to. Below is what I am going for, but if another way exists that is better, I am open to it.
Date | NDC | Status |
6/14/2024 | 00074-6215-13 | Removed |
6/14/2024 | 00074-7126-13 | Removed |
6/14/2024 | 00169-1833-11 | No Change |
6/14/2024 | 00169-1834-11 | No Change |
7/29/2024 | 00169-1833-11 | No Change |
7/29/2024 | 00169-1834-11 | No Change |
7/29/2024 | 00597-0375-97 | New |
7/29/2024 | 00597-0400-89 | New |
In this example, the first two NDCs have been removed as they are on 6/14/24, but not on the next date's file 7/29/24. The next two NDCs are on both files, so No Change is the result. Finally, the last two NDCs are on 7/29/2024 but are not on 6/14/24, thus the New status.
I have used the below to figure out the New NDCs, but I am having trouble getting the removed.
Solved! Go to Solution.
You might find my recent article useful https://exceleratorbi.com.au/finding-the-date-of-the-next-record-in-power-query/
I was solving a different problem but the structure of the problem is the same, ie how to match records on different rows and capture the dates. My only different advice would be to sort by NDC then Date as the first step.
Glad you liked my book 🙂
You might find my recent article useful https://exceleratorbi.com.au/finding-the-date-of-the-next-record-in-power-query/
I was solving a different problem but the structure of the problem is the same, ie how to match records on different rows and capture the dates. My only different advice would be to sort by NDC then Date as the first step.
I sure will!
I would also ask you to sign your book Supercharge Power BI: Power BI is Better When You Learn To Write DAX, but I have the kindle version. It was great and I use it a lot.
I'll update when I try it out.
Thank you!
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
32 |
User | Count |
---|---|
96 | |
75 | |
67 | |
52 | |
52 |