Forum Discussion
How to implement not in/except in DAX report?
Hi,
Please review below data:
NPI # of patients seen
A 10
B 15
C 30
How would I get the below from above?
NPI # of patients not seen by NPI
A 45
B 40
C 25
The above assumes that a given patient visits only assigned NPI.
Thanks!
Hi,
Drag NPI from into the Table visual. Try this measure
=CALCULATE(SUM(Data[# of patients seen]),ALL(Data[NPI]))-SUM(Data[# of patients seen]))
Hope this helps.
8 Replies
- Ashish_Mathur
Super User
Hi,
Drag NPI from into the Table visual. Try this measure
=CALCULATE(SUM(Data[# of patients seen]),ALL(Data[NPI]))-SUM(Data[# of patients seen]))
Hope this helps.
- ppgandhi11
Helper V
I tried this. I was expecting the results as you mentioned, but it shows 0 for all the NPIs.
Basically the first part of the calculation does not seem to lend Total of all the raws because it is becoming NPI specific so it prints 10 for A. Then second part is also 10, so the final number becomes 0. Any thoughts?
- ppgandhi11
Helper V
Sorry my bad. I was making a mistake. You were right on. This is exactly what I was looking for. Thanks much!
Prashant-
- Ashish_Mathur
Super User
You are welcome.
- nirvana_moksh
Impactful Individual
Your data set example to me is not fully clear, can you please describe it some more? Do you want do a negative filter or a filter for "IS NOT" equal to XYZ value?
- ppgandhi11
Helper V
NPI Calculation
A patient seen by All - Seen by A
B patient seen by All - Seen by B
C patient seen by All - Seen by C
makes sense?
- ppgandhi11
Helper V
And print it in the same line as the NPI.
NPI # of patients seen by other NPIs
A 45 (because B saw 15 + C saw 30)
B 40 (because A saw 10 + C saw 30)
C 25 (because A saw 10 + B saw 15)