Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi again, I have so many things to learn still with Power BI. Appreciate any help on any of my outstanding questions.
Here is my next one...
I have three columns:
PATIENT ID
PRIMARY DIAGNOSIS
SECONDARY DIAGNOSIS
I'm trying to create a measure that counts distinct patients who have a particular diagnosis in either the PRIMARY or SECONDARY diagnoses columns. For example:
PATIENT ID PRIMARY DIAGNOSIS SECONDARY DIAGNOSIS
123456789 Asthma Diabetes
456789123 COPD Asthma
741852963 Asthma Cancer
963852741 Hypertension COPD
123456789 Influenza Asthma
I want to create a measure that says, Unique Asthmatics WHERE if PRIMARY DIAGNOSIS or SECONDARY DIAGNOSIS = "
Asthma, then = Unique Asthma Patient
From the above, I would expect my measure to say, "Unique Asthma Patients = 3
Help???!?!?!
Solved! Go to Solution.
Hi,
You can create a measure as below:
Unique Asthma Patients = CALCULATE( DISTINCTCOUNT( Data[PATIENT_ID]), FILTER( Data, Data[PRIMARY_DIAGNOSIS] = "Asthma" || Data[SECONDARY_DIAGNOSIS] = "Asthma" ) )
Please accept this as a solution if it satisfies the requirement. Appreciate your Kudos. 🙂
Thanks.
Awesome! Thank you so much! If you can help me with the other solutions, that would be great as well!
Hi,
You can create a measure as below:
Unique Asthma Patients = CALCULATE( DISTINCTCOUNT( Data[PATIENT_ID]), FILTER( Data, Data[PRIMARY_DIAGNOSIS] = "Asthma" || Data[SECONDARY_DIAGNOSIS] = "Asthma" ) )
Please accept this as a solution if it satisfies the requirement. Appreciate your Kudos. 🙂
Thanks.
Awesome! Thank you so much! If you can help me with the other solutions, that would be great as well!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |