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
georgec96
Helper II
Helper II

Highest value formula

Hi All,

 

I've got the following dataset. I'm trying to find a formula that would help me keep the oldest PO Age value but a distinct value in the can_clear_backorders column.

 

As an example the first 2 PO Numbers serve the same purpose however i would like to show only the oldest one (based on PO Age column).

 

Any help much appreciated.

georgec96_0-1655366108092.png

 

1 ACCEPTED SOLUTION

@georgec96 
Please create it as a measure (New measure) not a calculated column

View solution in original post

8 REPLIES 8
tamerj1
Super User
Super User

Hi @georgec96 
Please try

Max PO Age =
VAR CurrentPOAge =
    MAX ( TableName[PO Age] )
VAR MaxPOAge =
    CALCULATE (
        MAX ( TableName[PO Age] ),
        ALLEXCEPT ( TableName, TableName[Desctription] )
    )
RETURN
    IF ( CurrentPOAge = MaxPOAge, MaxPOAge )

Hi @tamerj1 ,

 

I am getting the following error

 

georgec96_0-1655370208969.png

 

@georgec96 
the last Table should be  'Table'

Hi @tamerj1 , sorry to be a pain but this is not giving me the expected result as you can see.

 

georgec96_0-1655372916674.png

 

 

Is there any way I can create maybe a new table that would give me distinct values in the column Description but keep the highest value in the PO Age column?

@georgec96 
Please create it as a measure (New measure) not a calculated column

@tamerj1 ,

Perfect! Thanks alot that worked!

tamerj1
Super User
Super User

Hi @georgec96 
Please try

Max PO Age =
CALCULATE (
    MAX ( TableName[PO Age] ),
    ALLEXCEPT ( TableName, TableName[Desctription] )
)

Hi @tamerj1 ,

 

Any idea how can i make the table visual not to duplicate the values?

 

It's still showing the same as before after applying formula you provided.

 

georgec96_0-1655369092501.png

 

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.