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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
ahmedusam
Frequent Visitor

Change percentage of a card based on 2 visualization

Hey,

So I have this created.

 

ahmedusam_0-1644898781874.png

 

1. When I click the bar chart, I want the percentage on the card to be based on the data in the bar chart. For example, when i click completed from the bar chart, i want the card to show percentage of audits completed during the year.

 

2. Then, I want the same card to change percentage when i click random items from the table below based on the percentage each task has completed. - 

 

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @ahmedusam ,

Please try to create a measure like below:

Measure =
var one_year = CALCULATE(SUM(financials[ Sales]),FILTER(financials,YEAR(financials[Date])=2020))
return DIVIDE(SUM(financials[ Sales]),one_year)

Vlianlmsft_0-1645164027407.pngVlianlmsft_1-1645164043179.png

If the problem still exists, please remove the sensitive data and share a sample pbix.https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 

 

Best Regards,
Liang
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

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @ahmedusam ,

Please try to create a measure like below:

Measure =
var one_year = CALCULATE(SUM(financials[ Sales]),FILTER(financials,YEAR(financials[Date])=2020))
return DIVIDE(SUM(financials[ Sales]),one_year)

Vlianlmsft_0-1645164027407.pngVlianlmsft_1-1645164043179.png

If the problem still exists, please remove the sensitive data and share a sample pbix.https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 

 

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

amitchandak
Super User
Super User

@ahmedusam , Assume you are using measure M1 on visual

 

Then try a measure like

divide([M1], calculate([M1], allselected() ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.