Forum Discussion
Maximum Name according to date
Hello everyone good afternoon
I have the following case :
| Date | Number | ID |
| 01-01-2023 | AAEE | 1 |
| 07-05-2023 | OOII | 1 |
| 12-12-2023 | PPSS | 1 |
I would like to bring either in a table or column the name according to the maximum date per ID
in this case the expected result is PPSS, since it has the highest date of ID 1
Stay tuned for any questions
Best regards
Hi Syndicate_Admin ,
If I understand you correctly, please try this.Name / Latest date = var _id = MAX(HighName[ID]) var _calc = CALCULATE(MAX(HighName[Number]), FILTER(ALL(HighName), HighName[ID]=_id && HighName[Date] = MAX(HighName[Date]))) return _calc
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel
4 Replies
- Syndicate_Admin
Administrator
Hello
Thanks a lot
It works perfect as a measure, it's just to know
I only have one question, is there any way to leave it as a column or table??? , I did it as a column and it only returns blank values
- Nathaniel_C
Community Champion
Hi Syndicate_Admin ,
When you say as a column, do you mean as a calculated column?Thank you,
Nathaniel
- Nathaniel_C
Community Champion
Hi PVVB100, Syndicate_Admin ,
Here it is as a column:
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel
- Nathaniel_C
Community Champion
Hi Syndicate_Admin ,
If I understand you correctly, please try this.Name / Latest date = var _id = MAX(HighName[ID]) var _calc = CALCULATE(MAX(HighName[Number]), FILTER(ALL(HighName), HighName[ID]=_id && HighName[Date] = MAX(HighName[Date]))) return _calc
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel