Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply

How to set up time zone based on countries and show their local time when RLS is passed to a contrac

I have a contract table, it has contract names and there are countries based on contract. I have country table and their time zone code EX: '+05:30'. Contract table is connected to fact tables . RLS is set up for contract ID, My requirement is to set up a visual showing last refresh date and time, based on different region. Example if contract ID = 4, for this contract Country = Germany. Also schedule refresh is set up for 8 times a day. The Last refresh in the report should dynamically change and display last refreshed local time based on country. Note: Should consider Day light saving time.
ScreensShot_Community.png

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @Dharmendharan_L 

According to your description, you want to get the refresh time for different people and show the according to the timezone in their side .

For your need , i think you can add a date time in your Power Query and when you refresh , this date time will be changed and you can use it show the datetime you need in your report.

For the date time in Power Query , you can add a UTC+0 date time in it :

DateTimeZone.UtcNow - PowerQuery M | Microsoft Learn

How to Show Last Refresh Date in Power BI / Blogs / Perficient

 

And then you can create a measure to show the different datetime for different user in your logic . You can try to use the USERNAME() and USERPRINCIPLENAME() to get the current user in Power BI Service.

USERNAME function (DAX) - DAX | Microsoft Learn

And you can also refer to how to get the Daylight Savings Time in Dax i hope it can help you:
DAX Measure to Dynamically Offset Datetime Based on Daylight Savings Time | Sandeep Pawar (pawarbi.g...

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @Dharmendharan_L 

According to your description, you want to get the refresh time for different people and show the according to the timezone in their side .

For your need , i think you can add a date time in your Power Query and when you refresh , this date time will be changed and you can use it show the datetime you need in your report.

For the date time in Power Query , you can add a UTC+0 date time in it :

DateTimeZone.UtcNow - PowerQuery M | Microsoft Learn

How to Show Last Refresh Date in Power BI / Blogs / Perficient

 

And then you can create a measure to show the different datetime for different user in your logic . You can try to use the USERNAME() and USERPRINCIPLENAME() to get the current user in Power BI Service.

USERNAME function (DAX) - DAX | Microsoft Learn

And you can also refer to how to get the Daylight Savings Time in Dax i hope it can help you:
DAX Measure to Dynamically Offset Datetime Based on Daylight Savings Time | Sandeep Pawar (pawarbi.g...

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.