View Full Version : Power Pivot: Match next non-blank item after date match for customer across two table

2020-07-15, 03:29 PM

I need to create a calculated column in Table_Order that would find the next matching, non-blank Customer Status on or after the current Order Date for the current row Customer #.
The tricky part is when there is no matching Customer Status in Table_Ship for a Customer # on a particular Order Date (please see the orange highlights). The match then needs to be on the next matching Ship Date for the Customer # where the Customer Status is not blank.

Please could somebody help me and show me the DAX?

I've spent a long time Googling and have gotten nowhere. I feel like this should be easy!

Also please bear in mind that these tables are massively simplified versions of my actual work, and any suggestion to reorganise the tables or start from scratch won't help me, I need some DAX please!

Thanks in advance!


https://www.mrexcel.com/board/proxy.php?image=https%3A%2F%2Fi.stack.imgur.com%2FhcIed.png&hash=544460bb48d5794516fce06749a747c9 (https://i.stack.imgur.com/hcIed.png)

2020-07-15, 09:52 PM
Apologies, I should have said that this is for Excel Power Pivot (I can't work out how to edit my original post), thanks.

2020-07-16, 07:47 AM
Attach a workbook. not a picture of it.