Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 ?
StartTimeUTC | UTCOffsetMin |
28/05/2020 9:00 | 600 |
28/05/2020 10:00 | 600 |
28/05/2020 11:00 | 600 |
Solved! Go to Solution.
@frano72 , try
https://docs.microsoft.com/en-us/dax/firstnonblankvalue-function-dax
firstnonblankvalue(StartTimeUTC,Min(UTCOffsetMin))
@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 !!!!!!
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
6 |