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
Sudharshan1919
Helper III
Helper III

Latest Date

Hi All,

 

I am having 3 region sheets like Region1, Region2 and Region3. Those files get updated on a daily basis 4-5 times per day including with the timestamp, where the data is stored in the "DateTime Column" in that table. As of now i am displaying the data with the latest date time field. 

Below is the example how the data gets updated.

Region 1 : 14-09-2022 02:05:00 PM

Region 2:  14-09-2022 02:08:00 PM

Region 3:  14-09-2022 02:14:00 PM

Below is the Calculated  Column using DAX that we are using for each region seperately

Latest Date =
VAR CurrentDate = 'Region1'[Date Time - Region1]
VAR CurrentServer = 'Region1'[ServerName]
VAR EachServerTable =
     FILTER(
         'Region1',
         'Region1'[ServerName] = CurrentServer
     )
VAR LastDateTimeFetched =
   MAXX(
       'Region1',
       'Region1'[Date Time - Region1]
   )
RETURN
 IF(
     CurrentDate = LastDateTimeFetched,
     "Yes"
 )
Now, all these 3 sheets were merged and we have modified the DAX  a bit, but the latest data is displaying only for the latest available data (Consider in our example as Region3), but i need the latest data to be under the latest updated data for each region.
Can someone help me on this ?
 
Thanks
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Something like this should work as a calculated column

Latest date =
VAR CurrentDate = 'Table'[Date time]
VAR MaxDate =
    CALCULATE ( MAX ( 'Table'[Date time] ), ALLEXCEPT ( 'Table', 'Table'[Region] ) )
RETURN
    IF ( CurrentDate = MaxDate, "Yes" )

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

Something like this should work as a calculated column

Latest date =
VAR CurrentDate = 'Table'[Date time]
VAR MaxDate =
    CALCULATE ( MAX ( 'Table'[Date time] ), ALLEXCEPT ( 'Table', 'Table'[Region] ) )
RETURN
    IF ( CurrentDate = MaxDate, "Yes" )

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.