Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Percentage calculation in a row context

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.

 

JustinDoh1_0-1633382097065.png

 

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.

 

 

2 ACCEPTED SOLUTIONS
AlexisOlson
Super User
Super User

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] ) )
)

 

View solution in original post

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.

View solution in original post

4 REPLIES 4
JustinDoh1
Post Prodigy
Post Prodigy

@AlexisOlson Thanks. I will create a separate post. I think it might be better if I unpivot data of "Are_you_vacc..".

AlexisOlson
Super User
Super User

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] ) )
)

 

@AlexisOlson Thanks for help. How do I show these values in a column?

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors