cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Patryk Frequent Visitor
Frequent Visitor

Display Count Value as percentage of filtered value

Subject might be cryptic so let me explain:

 

What I have is a list of SharePoint sites (grouped) along with number of owners for each. I want to display what percentage of sites in each group have more than 5 owners.

 

Data example:

 

Site URL       Group        CountOfOwner

http1            Dep1          4   

http2            Dep1          2

http3            Dep1          5

http4            Dep2          1

http5            Dep1          8

http6            Dep3          2

http7            Dep3          6

http8            Dep3          5

http9            Dep2          4

http10          Dep3          10               

 

The count values for above would be:

Group       Sites with 4+ owners
Dep1        2

Dep2        0

Dep3        3

 

Percentages of 4+ owners vs total sites in group would then be

Group       Sites with 4+ owners
Dep1        2 out of 4 = 50%

Dep2        0 out of 2 = 0%

Dep3        3 out of 4 = 75%

 

I want to present this data as Column Chart (was using Clustered column chart so far) and am able to visualise the count easily by having count of owner set as value and filtered on visual level as CountOfOwner is greater than 4.

 

Have no idea how to get to the percentage though.

 

Any help appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Display Count Value as percentage of filtered value

@Patryk 

 

Try this MEASURE

Measure =
DIVIDE (
    CALCULATE ( COUNTROWS ( TableName ), TableName[CountOfOwner] > 4 ),
    COUNTROWS ( TableName )
) + 0
Try my new Power BI game Cross the River

View solution in original post

3 REPLIES 3
Super User III
Super User III

Re: Display Count Value as percentage of filtered value

@Patryk 

 

Try this MEASURE

Measure =
DIVIDE (
    CALCULATE ( COUNTROWS ( TableName ), TableName[CountOfOwner] > 4 ),
    COUNTROWS ( TableName )
) + 0
Try my new Power BI game Cross the River

View solution in original post

Patryk Frequent Visitor
Frequent Visitor

Re: Display Count Value as percentage of filtered value

Sadly no luck (or maybe I'm not able to use this measure properly after calculation?).

 

But wouldn't the countrows count all the rows in the table without grouping by Department?

Patryk Frequent Visitor
Frequent Visitor

Re: Display Count Value as percentage of filtered value

Of course it did'nt work because I only did the measure and failed to modify the visualisaiton to actualy refer to that measurement.

 

Now everything works as intended.

 

Thanks!

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors