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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
nok
Advocate II
Advocate II

Column that shows only the highest values ​​for each ID

Hello!

I have a table that has the following structure:

IDDAYS
AAA   3
AAA3
AAA5
BBB7
BBB7
CCC1
DDD9
DDD1

 

I want to create a new column that shows only the highest value of the DAYS column for each ID. The expected result would be like this:

IDDAYS   NEW_COLUMN
AAA   35
AAA35
AAA55
BBB77
BBB77
CCC11
DDD99
DDD19

 

How can I do this?

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @nok ,

Create a new column in your table with this DAX formula:

NEW_COLUMN = 
CALCULATE(
    MAX('Table'[DAYS]),
    ALLEXCEPT('Table', 'Table'[ID])
)


If this reply help you, please consider as solution and please give a kudo.

 

Thank you

View solution in original post

2 REPLIES 2
Bibiano_Geraldo
Super User
Super User

Hi @nok ,

Create a new column in your table with this DAX formula:

NEW_COLUMN = 
CALCULATE(
    MAX('Table'[DAYS]),
    ALLEXCEPT('Table', 'Table'[ID])
)


If this reply help you, please consider as solution and please give a kudo.

 

Thank you

FreemanZ
Super User
Super User

hi @nok ,

 

try like:

column =

MAXX(

    FILTER(

        data,

        data[ID]=EARLIER(data[ID])

    ),

    data[DAYS]

)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors