Forum Discussion
Anonymous
3 years agoNot applicable
Help: what is the Dax code To use????
Hi Newbie here in Dax formula,
what formula should i use if this is the outcome that i want to see ( expected Result, i want to get the oldest date). Thank you so much for the help
| ProfileId | Final Submission Date | DistinctProfileDate | expected Result | |
| 187475 | 10/03/2023 | 187475-3/10/2023 | 187475-3/10/2023 | |
| 187475 | 10/03/2023 | 187475-3/10/2023 | 187475-3/10/2023 | |
| 187475 | 27/03/2023 | 187475-3/27/2023 | blank | |
| 187475 | 27/03/2023 | 187475-3/27/2023 | blank | |
| 187475 | 27/03/2023 | 187475-3/27/2023 | blank | |
| 187475 | 01/04/2023 | 187475-4/1/2023 | blank | |
| 187475 | 01/04/2023 | 187475-4/1/2023 | blank | |
| 187475 | 01/04/2023 | 187475-4/1/2023 | blank | |
| 187475 | 01/04/2023 | 187475-4/1/2023 | blank | |
| 187475 | 01/04/2023 | 187475-4/1/2023 | blank | |
| 187475 | 01/04/2023 | 187475-4/1/2023 | blank | |
| 187475 | 01/04/2023 | 187475-4/1/2023 | blank | |
| 187475 | 24/04/2023 | 187475-4/24/2023 | blank | |
| 187475 | 24/04/2023 | 187475-4/24/2023 | blank | |
| 187475 | 27/04/2023 | 187475-4/27/2023 | blank | |
| 187475 | 27/04/2023 | 187475-4/27/2023 | blank | |
| 187475 | 27/04/2023 | 187475-4/27/2023 | blank | |
| 187475 | 28/03/2023 | 187475-3/28/2023 | blank |
2 Replies
- Greg_DecklerCommunity Champion
Anonymous As a column:
expected Result column = VAR __ProfileId = [ProfileId] VAR __MinDate = MINX(FILTER('Table', [ProfileId] = __ProfileId), [Final Submission Date]) VAR __Result = MINX(FILTER('Table', [ProfileId] = __ProfileId && [Final Submission Date] = __MinDate), [DistinctProfileDate]) RETURN __Result - sevenhillsSuper User
Exprected Column Result = IF ( 'Table'[ProfileId] = MIN('Table'[ProfileId]) && 'Table'[Final Submission Date] = CALCULATE(Min('Table'[Final Submission Date]), Filter('Table', 'Table'[ProfileId] = MIN('Table'[ProfileId]) && 'Table'[Final Submission Date] <= EARLIEST('Table'[Final Submission Date]))) , 'Table'[DistinctProfileDate], blank() )Column DAX code