Forum Discussion
Universal Date Slicer
Hello,
I am looking for suggestions regarding my current scenario. I have a table let's call it Task and it has two separate dates CreatedDate and ClosedDate. I have certain reports that measures tasks based on their CreatedDate while some reports measures tasks based on their ClosedDate. All tasks have CreatedDate but not all have ClosedDate. Now I wanted to Create a Universal Slicer for Date Month and Year and when I choose a month and year from this slicer, I want those reports that uses the CreatedDate to continue using teh CreatedDate value while following the filter and those that uses the ClosedDate column to continue using the ClosedDate value while also following the filter for the universal Date. Any suggestions on how I can formulate my Dax for my measures to follow the universal date slicer while still being separated with the CreatedDate and ClosedDate? I have seen a post where suggestions where to have to separate table where one is for the 1st date column and the other for the 2nd date column but i don't think this would work for me as I have 6 different tables with thousands of data in it so doubling it might cause an issue with the performance/space in the long run.
You'll create 2 relationships from your date table to your task table. One will be inactive then use the USERELATIONSHIP dax function to call the other date. Check out this article.
https://www.sqlbi.com/articles/using-userelationship-in-dax/
3 Replies
- SykResident Rockstar
You'll create 2 relationships from your date table to your task table. One will be inactive then use the USERELATIONSHIP dax function to call the other date. Check out this article.
https://www.sqlbi.com/articles/using-userelationship-in-dax/ - AnonymousNot applicable
Hi Kristoff15 ,
If you want the slicer for CreatedDate not to affect the visual for ClosedDate, you can remove the slicer's filter on the visual to achieve this. I've made a test for your reference:
Before
After
Best Regards,
Bof - Kristoff15Regular Visitor
I'm suprised it would be this easy! thank you so much it works!