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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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