Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have a file that contains the following information:
Drug Type (Generic, Brand, Specialty)
Rx Count (n=1)
Disease State Grouper (many different categories)
I am trying to find out what % of Rx Count is Generic but with Disease State Grouper (Vaccinations) excluded.
The issue I am running into is that for the denominator, I want it to be all Disease States within grouper Except Vaccines and the numerator to only include Drug type of Generic. I cannot seem to find a way to do both and keep the % filtered.
Thanks for your help.
hi @gcrisp
are you expecting something like:
Pct =
VAR _b =
COUNTROWS(
FILTER(
TableName,
TableName[Disease State Grouper] <>"Vaccines"
)
VAR _a =
COUNTROWS(
FILTER(
TableName,
TableName[Disease State Grouper] <>"Vaccines"
&&TableName[Drug Type]="Generic"
)
RETURN
DIVIDE(_a, _b)
I am a beginner with this so I am wondering if it is not working because I am putting the wrong thing for "pct", Var_a and Var_b. Should those be something more specific than as typed?
Trying that now. That looks similar to what I was doing.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 12 | |
| 10 | |
| 10 | |
| 9 | |
| 8 |