Forum Discussion
René
3 years agoFrequent Visitor
Find soonest data form second table
Dear fellow BI colleagues, I am struggling to get the following to work, as shown in the image below. My intention is to list the date, supplier name, and quantity to be received for each Sales O...
- 3 years ago
You could create a measure like
Next expected date = VAR CurrentProduct = SELECTEDVALUE ( 'Sales Order'[Product] ) VAR Supplier = MINX ( TOPN ( 1, FILTER ( 'PO Lines', 'PO Lines'[Product] = CurrentProduct && 'PO Lines'[Expected date] >= TODAY () ), 'PO Lines'[Expected date], ASC ), 'PO Lines'[Supplier] ) RETURN Supplierand then repeat that for the other columns you want.