Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone
I have a transaction table with a few million rows and a date&time column that contains records for several days.
Because the data gets pulled at a random time, some of my records in the table are not a full day worth of data.
I am looking for a way to filter my data to only include full days records i.e. 24 hrs ( 6 AM TO 6 AM) for every day in the table.
Any help is much appreciated
I agree you should split your DateTime into Date and Time columns (best practice). You could then add a custom column that returns 1 if the Date is today ( Date.From(DateTime.LocalNow()) ) and the hour is >=6, and 0 if not. You can then filter away the 1s.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi, @georgec96
Could you please consider sharing more details about it and posting expected result so it is clear on what needs to be implemented? And It would be great if there is a sample file without any sesentive information here.
It makes it easier to give you a solution.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I think you can construct a new column (adjusted day) which would be a date format (not datetime) and something like:
if hour is less than 6 then subtract 1 day from the date of date&time column else date of date&time
Any idea how to go about writing that formula in Power Query?
I just started working in Power BI not long ago and I'm not that familiar with the language.