Forum Discussion
New DAX measure filtering by distinct count and two numeric variables
- Anonymous1 year ago
Thanks for rsbin and Kedar_Pande's concern about this issue.
Hi, krlowe
I am glad to help you.
Based on your description and the suggestions of others, I have created a simple pbix file that I hope will help you.
First, since you didn't give any test data, I created some of my own for testing:
Then create a Measure Vaccine at 2 Months:Vaccine at 2 Months = CALCULATE( DISTINCTCOUNT(DTaP[ID]), DTaP[AgeMonths] <= 2, DTaP[OrdinalPosition] = 1 )
Output:I have attached this pbix file below, hope it helps you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
krlowe ,
Please try somthing like this (I am assuming you are referring to "variables" as your column fields 😞
Vaccine_at2Months = CALCULATE( DISTINCTCOUNT( DTaP[ID] ),
FILTER( DTaP, DTaP[AgeMonths] <= 2 &&
DTaP[OrdnalPosition] = 1 ))
If this does not provide the solution you are looking for, please paste a sample of your data (as a table, not as a picture).
Hope this gets you started.
Regards and Happy Holidays,
- krlowe1 year agoNew Member
Thanks all - I appreciate the help!!