Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Extract earliest date for distinct values in a separate column

Hello,

 

I have a dataset with "Task Name" and "Task Date". I want for each distinct task to create a column that will show the earliest date. See example data:

Task NameTask DateTask Earliest Date
A1/11/20191/11/2019
A1/13/20191/11/2019
A2/27/20191/11/2019
B3/24/20192/11/2019
B2/11/20192/11/2019
C5/5/20193/18/2019
C4/2/20193/18/2019
C3/18/20193/18/2019
C6/13/20193/18/2019

 

I want to create the "Task Earliest Date" in Power BI and show in a bar graph how many distinct tasks were created over time. What formula should I use for the new column?

  • Anonymous you can use following to get earliest date

     

    Earliest Date = CALCULATE( MIN ( dd[Task Date] ), ALLEXCEPT(dd, dd[Task Name] ) )

1 Reply

  • Anonymous you can use following to get earliest date

     

    Earliest Date = CALCULATE( MIN ( dd[Task Date] ), ALLEXCEPT(dd, dd[Task Name] ) )