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.
Hi @Daven ,
You can create a measure like this:
Local Time =
CONVERT (
FORMAT ( SELECTEDVALUE ( 'Table'[UTC] ), "MM/dd/YYYY" ) & " "
& REPLACE (
FORMAT ( SELECTEDVALUE ( 'Table'[UTC] ), "HH:MM:SS" ),
1,
2,
HOUR ( SELECTEDVALUE ( 'Table'[UTC] ) ) - 8
),
DATETIME
)
The number "-8" depends on your local timezone.
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Daven ,
You can create a measure like this:
Local Time =
CONVERT (
FORMAT ( SELECTEDVALUE ( 'Table'[UTC] ), "MM/dd/YYYY" ) & " "
& REPLACE (
FORMAT ( SELECTEDVALUE ( 'Table'[UTC] ), "HH:MM:SS" ),
1,
2,
HOUR ( SELECTEDVALUE ( 'Table'[UTC] ) ) - 8
),
DATETIME
)
The number "-8" depends on your local timezone.
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Vingjie,
Thanks for your response. I am getting an error and believe its because my dataset has UTC in datetime year to fraction (3). How do I convert it to Datetime? I am using directquery so unable to do any transformation. Has to be as a measure.
i.e UAT format: 2021-01-02T00:03:05.1330000
Thank you so much for your help
Daven
Yes. You can work out your time zone and make an an adjustment for the time using the TIME() function. But maybe it is better to convert it prior to load using Power Query.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |