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
Chanleakna123
Post Prodigy
Post Prodigy

Last Refresh Meaasure are different PBI Desktop , PBI Service

1.PNG

1st Pic : in Power BI Service 

2.PNG

2nd Pic : in Power BI Desktop , the right time should be follow Power BI Desktop 

 

this is M Code i'm using : 

 

let
TodaysDate = DateTime.From(DateTimeZone.SwitchZone(DateTimeZone.FixedLocalNow(),10)),
#"Converted to Table" = #table(1, {{TodaysDate}}),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Last Refresh Date Time"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Last Refresh Date Time", type datetime}})
in
#"Changed Type"

 

 

This is calculation i'm using : Last Refreshed (Local) = VALUES ( Query2[Last Refresh Date Time] )

 

team , there's sth between power BI Desktop and service , any solution on this ? 
I read the articles but find no right result. 

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Chanleakna123,

 

Current power bi service will convert all datetime to UTC format, I think your issue should related to it.

The simply solution is switch your datetime to UTC and manually add offset to fix up datetime after finish calculation.

 

Reference link:

Time in PBI Service is inconsistent with the local time (non-UTC time) displayed in PBI Desktop

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

hi @v-shex-msft , so how can i adjust it ? 

Can you help me on this ? 

Hi @Chanleakna123,

 

You can add a custom column with  UTCNOW function and timezone offset to force modify datetime to specific timezone datetime.

UTCNOW Function (DAX)

 

For example:

Fixed Local Now =
UTCNOW () + TIME ( 8, 0, 0 )
//offset: my timezone +8

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.