Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
i need the deneb vega clock need to take my measure and shoe date n time accordingly , for examples utc + 5:00 hours which is my desired time zone time and how can i show it? pl help me urgent.
in Vega examples we have a templet for clock but it works for now(), but i want it need to work for my desired zone, may be it can use a measure from data set or can be done inside the vega code , but it need to work for may desired time zone time.
Solved! Go to Solution.
Hi @PbiwithPrasad ,
You can use the Vega clock template in Power BI, but you need to modify it to show the time in your desired time zone. One way to do this is to use the DateTime.AddZone() and DateTimeZone.SwitchZone() functions in Power Query Editor to convert the UTC time to your desired time zone. You can then use this converted time in your Vega code to display the clock. Here is an example of how to do this:
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PbiwithPrasad ,
You can use the Vega clock template in Power BI, but you need to modify it to show the time in your desired time zone. One way to do this is to use the DateTime.AddZone() and DateTimeZone.SwitchZone() functions in Power Query Editor to convert the UTC time to your desired time zone. You can then use this converted time in your Vega code to display the clock. Here is an example of how to do this:
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
how do i need to add this converted time in Vega code to display the clock.
In the Vega clock template, replace "now()" with this expression, updated with the # of hrs you'd like to offset.
"timeOffset('hours', now(), 2)"
Pat
thak you @ppm1 , i got your point we can use utcoffset(),but how can we make it to take hours and minuits form two measures , i dont have idea on it can you plz make the code in detail.
below is the default clock code. i need it to work with my measure. if my measures ( hours &minuits ) result is 5 H and 30 Min , it need to show utc + 5:30.
Thanks in advance
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 10 | |
| 10 | |
| 6 | |
| 5 |