The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
My objective: I have a column which contains a DateTime. I want to use it in a Visualisation, and be able to filter on the Date part only. E.g. I want to filter all the records with a Date of 2nd February -- ignoring the Time part.
What I've tried: I set the format of the column to Date (as opposed to DateTime). But when I try to filter on the values, the Time part is apparently still being used.
E.g. if I choose 2nd February, I get no results ... There are several records which have a DateTime on that day, but none of them have exactly 12:00 AM as the time part.
If I use basic filtering, I see multiple values for each Date:
How can I filter all records on 2nd February? Many thanks for your help
Solved! Go to Solution.
Try this:
Request Date = DATE(YEAR(Requests[Request Submitted Date]),MONTH(Requests[Request Submitted Date]),DAY(Requests[Request Submitted Date]))
Well, one way would be to create a new column that is only a Date colum and not a DateTime column (as in the data type). You would just set it equal to your current date/time column.
Thanks smoupre. I actually tried exactly that.
My new column definition reads:
Request Date = Requests[Request Submitted Date]
And the data type for this column is Date (not DateTime).
But the behaviour of both columns is the same, in the Filter pane. Is there another step I need to take? Thanks.
Try this:
Request Date = DATE(YEAR(Requests[Request Submitted Date]),MONTH(Requests[Request Submitted Date]),DAY(Requests[Request Submitted Date]))
Smashing, that worked a treat. Thanks for your time & help -- much appreciated.
Awesome! 🙂