Forum Discussion
using two filters one with text and one date
- Anonymous7 years ago
Riantilo you almost had it, without closing off the &&Year with three close brackets the measure believes the final filter is for the YEAR argument.
So the below works! Thanks for your help! :-)
Eligible Members this Month = CALCULATE( DISTINCTCOUNT('Members'[MemberID]), MONTH('Case'[Createdon])=month(TODAY()) && YEAR('Case'[Createdon]=YEAR(TODAY())) , FILTER( 'Members', 'Members'[Eligible]="Yes" ) )
I think u can fix this bij changing the last && to a ,
This should work:
Eligible Members this Month =
CALCULATE(
DISTINCTCOUNT('Members'[MemberID]),
MONTH('Case'[Createdon])=month(TODAY()) &&
YEAR('Case'[Createdon]=YEAR(TODAY()) ,
FILTER(
'Members',
'Members'[Eligible]="Yes"
)
)
- Anonymous7 years agoNot applicable
Riantilo you almost had it, without closing off the &&Year with three close brackets the measure believes the final filter is for the YEAR argument.
So the below works! Thanks for your help! :-)
Eligible Members this Month = CALCULATE( DISTINCTCOUNT('Members'[MemberID]), MONTH('Case'[Createdon])=month(TODAY()) && YEAR('Case'[Createdon]=YEAR(TODAY())) , FILTER( 'Members', 'Members'[Eligible]="Yes" ) )- Riantilo7 years agoFrequent Visitor
I copied the code from the original post. And dit not see that mistake.
YEAR('Case'[Createdon]=YEAR(TODAY()))That explains why it didn't work.
to explain the error: The FILTER function can only be used in its own CALCULATE filter expression and can not be combined with the && or || operators.