Select Workorder with least MIN Value in context to a Part number

For List of parts that are short for many Job’s or Workorders , i wish to select the WO which has the least number of Days Available to be completed , from a group of many Workorder that require the same part

Demand Data.pbix (102.4 KB)

Hi @Unni,

Welcome to the Forum.

Based on your description I created this measure:

First Due WO = 
VAR WOlist = 
    SELECTCOLUMNS( 'Work Order Table Demo', 
        "@Item", [component_code],
        "@WO", [works_order],
        "@Due", [due_date]
    )
VAR FirstWoDate = TOPN( 1, WOlist, [@Due], ASC )
VAR Result = CONCATENATEX( FirstWoDate, [@WO], ", ")
RETURN

IF( ISINSCOPE( 'Main Sheet Demo'[Product] ),
    Result
) 

With this result.

I hope this is helpful.

Hi Melissa it very helpful your logic …thank you very much…for the solution as well as the welcome it is great to see such fast response :slight_smile:

2 Likes