Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Get earliest date by condition

Jolly Day,

 

I am needing to create a measure to get the earliest date by Item Code. 
I am needing only one result for item code filtered by the earliest date. 

I tried using the filter on the visual to get the earliest date but my results go wonky so I am needing to do this in a measure.

 

What I am currently getting. 

What I am needing

Item Code WO_DueDate
00-20046312/16/2022

 

Many thanks in advance!! 🙂

  • Hi,
    you can use this approach to create a column Earliest date in Power Query.

    Transform-Group by-Grouping by Item

     

2 Replies

  • olgad's avatar
    olgad
    Resident Rockstar

    Hi,
    you can use this approach to create a column Earliest date in Power Query.

    Transform-Group by-Grouping by Item

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    I love that Idea! I should have explained more though I am needing it to be a measure because Item code is coming from a table that doesn't directly tie to the table that has WODueDate. 

    Is there a way to accomplish this in a measure form?