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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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