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
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
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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.