Forum Discussion
rachelbi
Helper I
2 years agoCreate two date field relationship with date table for slicer
I have already had a "Date completed" relationship with Date table. What if I have another measure with "Date commenced" which also want to use the slicer to show dynamic figure. Is it possible? What...
rachelbi
Helper I
2 years agoThanks _AAndrade for your reply. I tried but don't know where to put the USERRELATIONSHIP() function.
.....
RETURN
CALCULATE(
DISTINCTCOUNT( Assessments[Assessment Title] ),
FILTER(
Assessments,
Assessments[Site Name.lookupId] IN SelectedSites
),
DATESBETWEEN(Assessments[Date Commenced],'Measure'[Start Date],'Measure'[EndDate])
)
- _AAndrade2 years ago
Resident Rockstar
Why you are using the assessments Date Commenced as a date table on DATESBETWEEN formula? You should use your date table.
The USERELATIONSHIP formula would be added on the filter of calculate function, but I didn't understand why you are using DATESBETWEEN formula.- rachelbi2 years ago
Helper I
I have made the inactive relationship and below change but still showing blank ...
...
RETURNCALCULATE(DISTINCTCOUNT( Assessments[Assessment Title] ),FILTER(Assessments,Assessments[Site Name.lookupId] IN SelectedSites),USERELATIONSHIP(Assessments[Date Commenced],'Date'[Date]))- _AAndrade2 years ago
Resident Rockstar
Try this:
CALCULATE(DISTINCTCOUNT( Assessments[Assessment Title] ),FILTER(ALL(Assessments),Assessments[Site Name.lookupId] IN SelectedSites)
),
USERELATIONSHIP(Assessments[Date Commenced],'Date'[Date]))