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
harakuruku
Helper I
Helper I

Return Latest Date

Hi all,

 

 

I have two tables. Location & Monitoring Date. I need to display the latest monitoring date of each location.

 

I was able to do it using the Latest function in PBI.
2018-05-15 13_47_59-Thiess_SolomonMine_WMS_Reporting_20180424_Barhead_v1 - Power BI Desktop.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


But I also need to have it in the separate column. I tried using the MAX function but it returns the MAX date for all the Location. Expected output should be like the Latest Monitoring Date.

 

See photo:

Untitled.png


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

My expected output should be like the Latest Date Monitoring.

 

Thank you!

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @harakuruku

 

You might be able to solve it using a calculated measure.

 

This might be close.  Jsut replace the Table4 with your own tablename

 

Measure = 
    CALCULATE(
        LASTDATE(
            'Table4'[Latest Monitoring_Date]),
            ALLEXCEPT(Table4,Table4[LocCode]
                )
                )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
dshah12
Helper II
Helper II

What if LASTDATE is not supported because of DirectQuery Data ?

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi  @harakuruku,

 

Have you solved your problem with the solution provided by @Phil_Seamark

 

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please share some sample data to reproduce the scenario.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @harakuruku

 

You might be able to solve it using a calculated measure.

 

This might be close.  Jsut replace the Table4 with your own tablename

 

Measure = 
    CALCULATE(
        LASTDATE(
            'Table4'[Latest Monitoring_Date]),
            ALLEXCEPT(Table4,Table4[LocCode]
                )
                )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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.