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.
Hello,
I have the following table:
ID | Diagnosis | Source | Status |
1 | A | Claims | Eligible |
1 | B | Medcation | Eligible |
1 | C | NULL | Not Eligible |
2 | A | NULL | Not Eligible |
2 | B | Claims | Eligible |
2 | C | NULL | Not Eligible |
3 | A | Medcation | Eligible |
3 | B | NULL | Not Eligible |
3 | C | Claims | Eligible |
I'm trying to add a Total Eligibilities by ID Column (Note: A Source of NULL means they are not Eligible) like so:
ID | Diagnosis | Source | Status | Total Eligibilities |
1 | A | Claims | Eligible | 2 |
1 | B | Medcation | Eligible | 2 |
1 | C | NULL | Not Eligible | 2 |
2 | A | NULL | Not Eligible | 1 |
2 | B | Claims | Eligible | 1 |
2 | C | NULL | Not Eligible | 1 |
3 | A | Medcation | Eligible | 2 |
3 | B | NULL | Not Eligible | 2 |
3 | C | Claims | Eligible | 2 |
I have tried the following with no success:
Solved! Go to Solution.
Make sure you are using do not summarize on Id column when you put to the table
Measure = CALCULATE(COUNTROWS(FILTER(Sheet1,Sheet1[Status]="Eligible")),ALLEXCEPT(Sheet1,Sheet1[ID]))
Pbix is attached after signature.
if you need more help make me @
Appreciate your Kudos.
Try like
Total Eligibilities = CALCULATE(DISTINCTCOUNT('Patient Conditions'[Diagnosis]),ALLEXCEPT('Patient Conditions','Patient Conditions'[Status]),'Patient Conditions'[Status]= "Eligible")
Also, this gives a good example to deal with subtotal :https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390
Thanks, for the response @amitchandak. That gets me closer, but it is now only giving me the distinct number of diagnosis with a status of "Eligible" for the entire dataset, not by ID. I tried added another ALLEXCEPT function including the ID, but that didn't change anything.
Thanks for the link, I'll look at that now as well.
Appreciate the help!
-Taylor
Make sure you are using do not summarize on Id column when you put to the table
Measure = CALCULATE(COUNTROWS(FILTER(Sheet1,Sheet1[Status]="Eligible")),ALLEXCEPT(Sheet1,Sheet1[ID]))
Pbix is attached after signature.
if you need more help make me @
Appreciate your Kudos.
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 |