Forum Discussion
Filtering a table to a new table
- 5 years ago
I'm not totally sure I follow the goal, but if you're familiar with Lag and Lead in SQL, is the idea that if there's a Lead value on the date, to leave the column blank? If so I think this is what you're looking for. Still new myself but I used this a while ago and I think this will work if I follow ask correctly:
https://community.powerbi.com/t5/Desktop/Lead-and-Lag-in-DAX/td-p/649162
I'm not totally sure I follow the goal, but if you're familiar with Lag and Lead in SQL, is the idea that if there's a Lead value on the date, to leave the column blank? If so I think this is what you're looking for. Still new myself but I used this a while ago and I think this will work if I follow ask correctly:
https://community.powerbi.com/t5/Desktop/Lead-and-Lag-in-DAX/td-p/649162
I was able to pull the Latest date where ProjectID=ProjectID and Status=Status. I still do not know how to set this equation up to only keep one value per status per project ID.
| ProjectID | Status Extract | Modified | Last Status Date (New column) |
| 34631 | 2.1 | 6/1/20 | |
| 34631 | 2.1 | 6/4/20 | 6/4/20 |
| 34631 | 4.0 | 6/20/20 | 6/20/20 |
| ProjectID | Status Extract | Modified | Last Status Date (New column) |
| 34631 | 2.1 | 6/1/20 | 6/4/20 |
| 34631 | 2.1 | 6/4/20 | 6/4/20 |
| 34631 | 4.0 | 6/20/20 | 6/20/20 |