Forum Discussion
Anonymous
6 years agoNot applicable
Create a Measure: Add an additional OR criteria
Hi, I created a measure that I now need to add additional criteria to. It is perfoming correctly but I'd now like to also include these instances: 'Claim Data Pull'[Service Code] IN {"76700", "...
- 6 years ago
Anonymous
try
Abdominal Aortic Aneurysm Participating = ( CALCULATE(DISTINCTCOUNT('Claim Data Pull'[Member ID]), FILTER('Claim Data Pull','Claim Data Pull'[Gender]="Male" && 'Claim Data Pull'[Age]>=65 && 'Claim Data Pull'[Age]<=75 && ( 'claim data pull'[Dx 1] IN {"Z87.891", "F17.210", "F17.211", "F17.213", "F17.218", "F17.219", "Z00.00", "Z00.01", "Z00.8"} || 'Claim Data Pull'[Service Code] IN {"76700", "76705", "76770", "76775", "G0389"} ) ) ))
amitchandak
6 years agoSuper User
Inside filter use || or and &&
Example
CALCULATE(DISTINCTCOUNT('Claim Data Pull'[Member ID]), FILTER('Claim Data Pull','Claim Data Pull'[Gender]="Male" &&'Claim Data Pull'[Age]>=65,'Claim Data Pull'[Age]<=75 && 'claim data pull'[Dx 1] IN {"Z87.891", "F17.210", "F17.211", "F17.213", "F17.218", "F17.219", "Z00.00", "Z00.01", "Z00.8"} || 'Claim Data Pull'[Service Code] IN {"76700", "76705", "76770", "76775", "G0389"}))
Anonymous
6 years agoNot applicable
I think Amitchandak's solution is pretty close but it also has an error:
"Too many arguments were passed to the FILTER function. The maximum argument count for the function is 2."
It looks like the || function is limited to only 2 arguments. Since we already have an Age clause and a Dx 1 clause ... I don't this is correctly processing the Service Code clause.