Forum Discussion
Anonymous
6 years agoNot applicable
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 Name | Task Date | Task Earliest Date |
| A | 1/11/2019 | 1/11/2019 |
| A | 1/13/2019 | 1/11/2019 |
| A | 2/27/2019 | 1/11/2019 |
| B | 3/24/2019 | 2/11/2019 |
| B | 2/11/2019 | 2/11/2019 |
| C | 5/5/2019 | 3/18/2019 |
| C | 4/2/2019 | 3/18/2019 |
| C | 3/18/2019 | 3/18/2019 |
| C | 6/13/2019 | 3/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
- parry2k
Super User
Anonymous you can use following to get earliest date
Earliest Date = CALCULATE( MIN ( dd[Task Date] ), ALLEXCEPT(dd, dd[Task Name] ) )