Skip to main content
Showing results for 
Search instead for 
Did you mean: 

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.

New Member

Dynamic Max Age grouped by playerID by slicer years



I have the following table which bascially what I want is for the table to show a unique playerID name (i.e. Aaron_Cadman) at his maximum age for the selected season and its records...


e.g. if i select year interval 2021-2022, it should show the maximum age for that player for this interval

if i select 2021-2023, it should show the maximum age for the player for this interval


Could someone please kindly look into this one? Thanks!




Community Support
Community Support

Hi @jakezhang ,

Please have a try.

Create a meausre.

MaxAge = CALCULATE(MAX(Table[Age]), ALLEXCEPT(Table, Table[playerID]))

Removes all context filters in the table except filters that have been applied to the specified columns.

ALLEXCEPT function (DAX) - DAX | Microsoft Learn



How to Get Your Question Answered Quickly - Microsoft Fabric Community


If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .


Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.





New Member

Hi there, 


I forgot to mention that PlayerAge -> Int is not included in the above table, I was thinking to use this to create a filter to dynamically change the way the table would present itself with users interactions with the date slicer...



Advocate II
Advocate II

You'll need to convert your age to a number because it wont work with the text. So if you create a measure we shall call PlayerAge, 

MaxAge = MAX(PlayerAge)

Bear in mind that this will only give you the Max Age if you only have Player ID and MaxAge in a table. If you want it to show in the table you have shown above, then you'll need to do something a little different.

Helpful resources

Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City


Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.