Forum Discussion
ghostonpower225
4 years agoFrequent Visitor
Delete Row after condition is met
I am trying to delete status "P" row once there is a date in due date actual for status "I". I can not seem to wrap my head around this one. Any support or help is much needed. Status I...
HotChilli
Community Champion
4 years agoI have had another look at this. Next time please post some sample data as text. Presumably this is on a per ID basis
--
First, if you add a column (call it DTAndI ) to show if the Status is I and the date is not null (make it a 1 for this condition and 0 otherwise) - that helps in the next step.
--
Then add a custom column:
let AnID = [id] in if [Status] = "P" then Table.MatchesAnyRows(previousStep, each [id] = AnID and [DTAndI] = 1) else null
that should put TRUE, FALSE or null in the column and you can filter out rows you don't want from the column header.
ghostonpower225
4 years agoFrequent Visitor
When I try the information you provided, it has added more rows. I am not sure why. I think it will work if I figure out why more rows are being added. Also, I have added some sample data. Thank you for your support.