Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone
Below I have a table with dates and scores by name.
Nom | Date | Score |
AAA | 01.01.2021 | 1540 |
AAA | 02.01.2021 | 1640 |
AAA | 03.01.2021 | 1753 |
AAA | 04.01.2021 | 1840 |
AAA | 05.01.2021 | 1940 |
AAA | 06.01.2021 | 2040 |
AAA | 07.01.2021 | 870 |
BBB | 01.01.2021 | 875 |
BBB | 02.01.2021 | 698 |
BBB | 03.01.2021 | 566 |
BBB | 04.01.2021 | 641 |
BBB | 05.01.2021 | 255 |
CCC | 01.01.2021 | 120 |
CCC | 02.01.2021 | 218 |
CCC | 03.01.2021 | 55 |
I need to display only the last score recorded by name.
Nom | Date | Score |
AAA | 07.01.2021 | 870 |
BBB | 05.01.2021 | 255 |
CCC | 03.01.2021 | 55 |
Thanks for your help
Solved! Go to Solution.
Hi @Mediviz ,
You can try this measure:
MaxValuePerNom =
VAR currNom = SELECTEDVALUE ( T[Nom] )
VAR maxDate = MAXX ( FILTER ( ALL ( T ), T[Nom] = currNom ), T[Date] )
RETURN
IF (
SELECTEDVALUE ( T[Date] ) = maxDate,
CALCULATE ( MAX ( T[Score] ), T[Nom] = currNom, Table15[Date] = maxDate )
)
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Hi @Mediviz ,
Try this:
Measure filter =
VAR LastDate_ =
CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Nom] ) )
RETURN
IF ( MAX ( 'Table'[Date] ) = LastDate_, 1 )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Mediviz ,
Try this:
Measure filter =
VAR LastDate_ =
CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Nom] ) )
RETURN
IF ( MAX ( 'Table'[Date] ) = LastDate_, 1 )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Mediviz ,
You can try this measure:
MaxValuePerNom =
VAR currNom = SELECTEDVALUE ( T[Nom] )
VAR maxDate = MAXX ( FILTER ( ALL ( T ), T[Nom] = currNom ), T[Date] )
RETURN
IF (
SELECTEDVALUE ( T[Date] ) = maxDate,
CALCULATE ( MAX ( T[Score] ), T[Nom] = currNom, Table15[Date] = maxDate )
)
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
@Mediviz , Try a measure like
Measure =
VAR __id = MAX ('Table'[Nom] )
VAR __date = CALCULATE ( max('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Nom] = __id )
CALCULATE ( Sum ('Table'[Score] ), VALUES ('Table'[Nom] ),'Table'[Nom] = __id,'Table'[Date] = __date )
if need take amx for dat
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |