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
bw70316
Helper V
Helper V

Display percentage of bar chart in Card based on filter

I have a graphic of counts per age via zip code and I was hoping to be able to display a % based on the selected zip code. For example, 87 kids aged 4-7 with 14 of them residing in zip code 27704. How do I display 14/87 as a % so that regardless of the zip code I click on, I am provided with the % of kids who are aged a certain age? Thanks in advanceUntitled.png

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@bw70316 ,

 

You may create a measure using dax like pattern below:

Percentage =
COUNT ( Table[kids] ) / CALCULATE ( COUNT ( Table[kids] ), ALL ( Table ) )

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@bw70316 ,

 

You may create a measure using dax like pattern below:

Percentage =
COUNT ( Table[kids] ) / CALCULATE ( COUNT ( Table[kids] ), ALL ( Table ) )

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, I have meetings all morning but will try this solution this afternoon and accept your solution if it is a workable solution. Thanks again for the reply.

amitchandak
Super User
Super User

Create one measure that excludes those filter which you do not want denominator to consider. Except clause can be used for that.

 

Divide it by the numerator that considers other filters. 

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.