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
Patryk
Regular 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
Zubair_Muhammad
Community Champion
Community Champion

@Patryk 

 

Try this MEASURE

Measure =
DIVIDE (
    CALCULATE ( COUNTROWS ( TableName ), TableName[CountOfOwner] > 4 ),
    COUNTROWS ( TableName )
) + 0

Regards
Zubair

Please try my custom visuals

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@Patryk 

 

Try this MEASURE

Measure =
DIVIDE (
    CALCULATE ( COUNTROWS ( TableName ), TableName[CountOfOwner] > 4 ),
    COUNTROWS ( TableName )
) + 0

Regards
Zubair

Please try my custom visuals

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?

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
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.