Forum Discussion
Getting a previous value using 2 matching columns
- Anonymous4 years ago
Hi SClarke501 ,
You can create a calculated column as below, please find the details in the attachment.
Left = VAR _predate = CALCULATE ( MAX ( 'Table'[Entry Date] ), FILTER ( 'Table', 'Table'[ID] = EARLIER ( 'Table'[ID] ) && 'Table'[Entry Date] < EARLIER ( 'Table'[Entry Date] ) ) ) RETURN CALCULATE ( MAX ( 'Table'[Entered] ), FILTER ( 'Table', 'Table'[ID] = EARLIER ( 'Table'[ID] ) && 'Table'[Entry Date] = _predate ) )Best Regards
Hey SClarke501,
That is a bummer..
You would assume that datetime is unique enough. Of course, it is not possible to leave or enter two countries at the same time at exactly the same time.
If I was responsible for the report, I would report your observation back to the owner of the dataset. This must be an incorrect entry.
I can not come up with something to make it more unique..
The actual data is not about moving between countries, its about tasks being moved on a kanban board.
I suppose I should have come up with a better set of false data to represent my problem, apologies.
I think I may just have to do some cleansing and handle duplicate columns. I appreciate your help either way