Forum Discussion
Date slicer with multiple dates and tables
- Anonymous4 years ago
Hi sebco
Are calendar and msfp_surveyinvite two separate tables with no relationship created ? I restored your scene, everything looks fine .
(1)Create a Calendar date table ,and add a slicer with calendar date . Then create two measures to return the Max and Min date when change date in Slicer .
Max Date = MAX('Calendar Date'[Date])Min Date = MIN('Calendar Date'[Date])(2)Then create a measure for data table to judge whether the date in data table is contained in slicer date range , if yes ,return 1 , no return 0 .
Measure = IF(SELECTEDVALUE(Data[Date])>=[Min Date] && SELECTEDVALUE(Data[Date])<=[Max Date],1,0)The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sebco why you need to create this column, why not you have relationship set from date table to your other tables on created date, and add you select the date range, it will filter the data.
- sebco4 years agoNew Member
parry2k The dataset is from Microsoft Customer Voice with several different relationships. The Calendar table (marked as a date table) will only let me create one relationship with the other tables I need to filter (surveyinvite, customerresponse, questionresponse). Other relationships from the calendar table create primary/secondary issues which will not let me activate them without removing other relationships which I can't do.