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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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