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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jasonyy
New Member

Need help to get the latest value based on latest update date.

Hi, I need help / advice on how to get the latest standard cost value based on last update date for different country.

I have try Calculate method, but not able to get the desired outcome on standard cost. Please help to advise what can i do.

 

Below are the sample table data.

jasonyy_3-1710307946549.png

 

 

This are the desired preferred outcome in power bi desktop, but i'm not able to get the latest value for standard cost.

jasonyy_2-1710307811822.png

 

Thanks

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jasonyy ,

Please try the following methods and check if they can solve your problem:

1.Create the simple table.

vjiewumsft_0-1710410416918.png

2.Create a new measure to filter.

 

STD_COST = 
VAR latest_d = CALCULATE(MAX([Lat_update_date]), ALLEXCEPT('Table', 'Table'[Organization code]))
RETURN
CALCULATE(
    SUM('Table'[ITEM cost]), FILTER('Table', 'Table'[Lat_update_date] = latest_d)
)

 

3.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1710410439745.png

 

Best Regards,

Wisdom Wu

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

4 REPLIES 4
Anonymous
Not applicable

Hi @jasonyy ,

Please try the following methods and check if they can solve your problem:

1.Create the simple table.

vjiewumsft_0-1710410416918.png

2.Create a new measure to filter.

 

STD_COST = 
VAR latest_d = CALCULATE(MAX([Lat_update_date]), ALLEXCEPT('Table', 'Table'[Organization code]))
RETURN
CALCULATE(
    SUM('Table'[ITEM cost]), FILTER('Table', 'Table'[Lat_update_date] = latest_d)
)

 

3.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1710410439745.png

 

Best Regards,

Wisdom Wu

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

 

 

Dangar332
Super User
Super User

hi, @jasonyy 

 

not sure but try below code for measure

 

STD_COST=
var a = maxx(
          filter(
            all(table),
            table[item_number]=max(table[item_number])&&
            table[organization_code]=max(table[organization_code])&&
            table[currency]=max(currency)
          ),
          table[last_update_date]
        )
return
sumx(
  filter(
    table,
    table[last_update_date]=a
  ),
  table[item_cost]
)

 

 

Hi Dangar,

 

Thanks for your suggestion. I have tried it out, but not able to get the desired outcome. 

Using the solution provided, it seem that it aggregate the value up and display accordingly as per below print screen. 

 

Thanks

jasonyy_0-1710312658986.png

 

hi, @jasonyy 

 

try updated code it might work

STD_COST=
var a = maxx(
          filter(
            all(table),
            table[item_number]=max(table[item_number])&&
            table[organization_code]=max(table[organization_code])&&
            table[currency]=max(currency)
          ),
          table[last_update_date]
        )
return
sumx(
  filter(
    all(table[last_update_date], table[item_cost]),
    table[last_update_date]=a
  ),
  table[item_cost]
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.