Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am sharing my Pbix file here;
I am trying to come up with percentage of data displayed on a separate column as illustrated below.
I am only calculating % using output of two columns (Percentage Qualified A & Percentage Qualified B).
The values are coming from Count.
So, the expected output are 90.5 % (for Client_ID 129532) and 86.9% (Client_ID 129533).
How do we go about doing this?
Thanks.
Solved! Go to Solution.
Try this (table and column names abbreviated for readability):
% Qualified =
DIVIDE (
CALCULATE (
COUNT ( vw[Client_ID] ),
vw[Are_you_vaccinated] IN { "Percentage Qualified A", "Percentage Qualified B" }
),
CALCULATE ( COUNT ( vw[Client_ID] ), REMOVEFILTERS ( vw[Are_you_vaccinated] ) )
)
They won't neatly go into another column in your existing visual since that matrix uses [Are_you_vaccinated] for the columns already. I'd suggest asking a separate question to resolve any layout issues.
@AlexisOlson Thanks. I will create a separate post. I think it might be better if I unpivot data of "Are_you_vacc..".
Try this (table and column names abbreviated for readability):
% Qualified =
DIVIDE (
CALCULATE (
COUNT ( vw[Client_ID] ),
vw[Are_you_vaccinated] IN { "Percentage Qualified A", "Percentage Qualified B" }
),
CALCULATE ( COUNT ( vw[Client_ID] ), REMOVEFILTERS ( vw[Are_you_vaccinated] ) )
)
They won't neatly go into another column in your existing visual since that matrix uses [Are_you_vaccinated] for the columns already. I'd suggest asking a separate question to resolve any layout issues.
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
30 | |
13 | |
11 | |
9 | |
6 |