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
frano72
Helper IV
Helper IV

Find oldest date in column, then add a value from another column (without using calculated column)

Hi, I've got what I thought was a relatively straight forward DAX issue but cannot find a way of doing it in a measure versus a calculated column.

 

I have a column of UTC dates and in an adjoining column the appropriate UTCOffset value in minutes to convert to NSW timezone.

 

I want to find the oldest value in the UTC Date column (so filter down to a single row) and then add the value in the UTCOffset column for that row.

 

I can do it by using a calculated column but thought it might be a waste of memory to do that calculation for all the dates when I only need to do it on a single date AFTER the minimum has been found.

Any ideas ?

StartTimeUTCUTCOffsetMin
28/05/2020 9:00600
28/05/2020 10:00600
28/05/2020 11:00600
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

2 REPLIES 2
amitchandak
Super User
Super User

@frano72 , try

https://docs.microsoft.com/en-us/dax/firstnonblankvalue-function-dax

firstnonblankvalue(StartTimeUTC,Min(UTCOffsetMin))

Hey @amitchandak , almost what i wanted and you got me on the right track - thanks !

 

firstnonblankvalue(StartTimeUTC,Min(StartTimeUTC))    - this one returns the oldest UTC value

firstnonblankvalue(UTCOffsetMin,Min(StartTimeUTC))    - this one returns the UTCoffset for the oldest UTC value

 

then just needed to add them together to convert to local time.

 

Thanks !!!!!!

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.

Top Solution Authors