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 August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Value of column from max value of another column in summarize

How to create a new column dynamically in a measure with summarize that takes the value of one column based on the row of the maximum date that is present in another column in the summarized group.

 

I wouldn't be able have my table sorted by the date before loading the data, so I havent been able to use the FIRSTNONBLANKVALUE the way I want to

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample.

vkalyjmsft_1-1651803537064.png

In my understanding, the Date column changed dynamically in the data source, if you want to create a new column to get the Sales value on the maxmum date, here's my solution. The formula also works in a measure.

Column =
CALCULATE (
    MAX ( 'Table'[Sales] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Date] = MAXX ( ALL ( 'Table' ), 'Table'[Date] )
    )
)

Get the correct result.

vkalyjmsft_0-1651803499332.png

If the maxmum date changed in the data source, it still works.

vkalyjmsft_2-1651803939338.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

 

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample.

vkalyjmsft_1-1651803537064.png

In my understanding, the Date column changed dynamically in the data source, if you want to create a new column to get the Sales value on the maxmum date, here's my solution. The formula also works in a measure.

Column =
CALCULATE (
    MAX ( 'Table'[Sales] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Date] = MAXX ( ALL ( 'Table' ), 'Table'[Date] )
    )
)

Get the correct result.

vkalyjmsft_0-1651803499332.png

If the maxmum date changed in the data source, it still works.

vkalyjmsft_2-1651803939338.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

 

lbendlin
Super User
Super User

"create a new column dynamically in a measure" 

 

You cannot create columns from measures. Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

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.