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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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