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
MarcUrdang
Post Patron
Post Patron

Date created in Power query

When bringing in data via Power Query I see that the DATE CREATED is showing yesterday's date? I need to be able to filter on only bringing in new data so I would need to filter on TODAY's data only .. .but if the date is incorrect then how would one do this?

 

thanks

Marc

2 ACCEPTED SOLUTIONS
v-easonf-msft
Community Support
Community Support

Hi , @MarcUrdang 

Not clear what you want.

If what you want is just to filter  data equal today  in powerquery ,you can  try the following m query formula :

 

 

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] =  DateTime.Date(DateTime.LocalNow()))

 

 

If not ,please explain it more and kindly share your screenshoot .

 

Best Regards,
Community Support Team _ Eason
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

Hi ,  @MarcUrdang 

Unless you are in the  UTC time zone, you and your colleague must account for the time offset you experience. 

You can use DateTime.AddZone function to achieve your requirement. This function adds the timezonehours as an offset to the input datetime value and returns a new datetimezone value.

 

DateTime.AddZone([datetime], an offset )

 

 

You may  refer to these related post.

https://community.powerbi.com/t5/Desktop/Convert-UTC-to-client-time-zones/m-p/56337

https://community.powerbi.com/t5/Desktop/Convert-utc-to-local-time-zone-using-Power-Query/m-p/45533

 

Best Regards,
Community Support Team _ Eason
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

6 REPLIES 6
v-easonf-msft
Community Support
Community Support

Hi , @MarcUrdang 

Not clear what you want.

If what you want is just to filter  data equal today  in powerquery ,you can  try the following m query formula :

 

 

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] =  DateTime.Date(DateTime.LocalNow()))

 

 

If not ,please explain it more and kindly share your screenshoot .

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi ... I am not sure I was being clear enough so apologies for that .. what I mean is that whene you 'get data' and you point to a folder in OneDrive or SharePoint you have the option to filter in only those file you want to combine. One of those filters is based on 'time created'. However it seems that PBI is set to another time zone. I am in South Africa which is GMT+2 .... so if I create an Excel file at 08h00 the time in the 'create date' field shows perhaps 23h59.

 

So if I then filter on TODAY then I get a different number of files.

 

Any thoughts?

Hi ,  @MarcUrdang 

Unless you are in the  UTC time zone, you and your colleague must account for the time offset you experience. 

You can use DateTime.AddZone function to achieve your requirement. This function adds the timezonehours as an offset to the input datetime value and returns a new datetimezone value.

 

DateTime.AddZone([datetime], an offset )

 

 

You may  refer to these related post.

https://community.powerbi.com/t5/Desktop/Convert-UTC-to-client-time-zones/m-p/56337

https://community.powerbi.com/t5/Desktop/Convert-utc-to-local-time-zone-using-Power-Query/m-p/45533

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

From what you're describing it might actually be your SharePoint timezone that needs set, not the Power BI one if the date created date is showing as incorrect. Does the date created show properly in OneDrive/SharePoint? You can set regional settings for Power BI data load in the File > Options and there are a few different time zone options for working with dates in Power BI. 

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

amitchandak
Super User
Super User

The information you have provided is not making the problem clear to me. Can you please explain with an example.
Refer if this can help :https://www.thebiccountant.com/2017/01/11/incremental-load-in-powerbi-using-dax-union/
Appreciate your Kudos.

AllisonKennedy
Super User
Super User

@MarcUrdang  Where are you pulling the data from? What DATE CREATED info are you referring to? Is this a column in the data itself? Could it be a timezone issue?


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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.