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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PowerrrBrrr
Helper III
Helper III

What's the alternative to use with Direct Query?

So I have table with [TimeStamp] in it and I have created a custom column with below formulae

=DateTimeZone.RemoveZone([TimeStamp])+#duration(0,3,0,0) ,

but this custom column was allowed in Import mode, when I do Direct Query I can't create one. How do I fix this in Direct query, which gives me same result as above code??


1 ACCEPTED SOLUTION
Anonymous
Not applicable

@PowerrrBrrr 

Of course you can do that in dax, you may create the measure in Direct Query mode.

 

Measure = MAX([DateTime])+TIME(3,0,0)

Vpazhenmsft_0-1634632695786.png

 

Best Regards
Paul

 

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

@PowerrrBrrr 

Of course you can do that in dax, you may create the measure in Direct Query mode.

 

Measure = MAX([DateTime])+TIME(3,0,0)

Vpazhenmsft_0-1634632695786.png

 

Best Regards
Paul

 

Anonymous
Not applicable

@PowerrrBrrr 

 

Please make sure the TimeStamp column in your datasource is already Datetime type before connecting to Power BI. Direct Query doesn't support changing Text type date column to datetime type.

 

 

Paul

The timestamp column in Power Bi do show the Datetime format in Modelling tab , though it does not show the calendar icon beside the field name as a normal datetime field will show in normal table in Power Bi but i believe that is direct query feature and direct query do not support hirearchy.

I am looking if someone can confirm that with direct query I can create a measure to add time to a timestamp column from a direct query table

Anonymous
Not applicable

@PowerrrBrrr 

 

It is a custom column.

Vpazhenmsft_0-1634549286615.png

 

 

Paul

yeah.. but this you cant create with direct query

Anonymous
Not applicable

@PowerrrBrrr 
In this case you can just + 3 hours to the timestamp column. Direct Query just does not support the timezone function, which is not necessary.

=[TimeStamp]+#duration(0,3,0,0)

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

this is a measure what you have created ? I dont get the result when I create a measure.

Anonymous
Not applicable

@PowerrrBrrr 

I am afraid you can only switch the connect mode to import, this is a limitation of direct query. Is there any reason that you don't want to use import mode?

 

Use DirectQuery in Power BI Desktop - Power BI | Microsoft Docs

"To remedy the error, either delete the problematic step in Power Query Editor, or import the data instead of using DirectQuery."

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

its just we cant use import here, due to some limitation on data frequently changing. isnt there a way we can increase the hours in my timestamp field by 3 or 4 hours. thats all i need to change the time zone

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.