Forum Discussion
Slicer Options for Datetime Format Parameter
- 8 months ago
hello cody_c
i am not sure how your data looks like.
in my experience, since this is direct query, i did couple workaround to achieve the requirement.
here is an example..
1. 3fff... something is a direct query table.
2. then i summarize that direct query table. as you can see, the date is in datetime format.
3. then i created calculated column to simplify the datetime format into date format
4. create a relationship between those two table
5. plot into visual with summarize table as date slicer
i am not sure if this is a composite model, but here is what i did with direct query table and need to do a little change.
Hope this will help.
Thank you.
Hi cody_c, the field used in the slicer does not have to be datetime as well. It can be a Date type, as long as it can be coerced to DateTime (00:00:00) when passed into the query. Because your underlying datetime data is always 00:00:00 anyway, this is safe. So in Power Query just change the type of the datetime column in the DIMDATE tables to type Date and your slicer filtering should keep working as it is now.
Hope this helps. If so, please give kudos 👍 and mark as Accepted Solution ✔️ to help others.