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
Anonymous
Not applicable

bar chart

2018 11 12 power bi printscreen 02.png

 

Hi,

I have a table with a set of funds. Each fund has an 'amount fund' and beongs to a 'sector'.

In a barchart I show the sum of the 'amount fund'  per sector in percentages (green bars).

There are 3 sectors and each sector has a maximum (the pct should stay below this percentage.)

I have created a seperate tabel with 2 columns: 'Sector' and 'Max' (containing the max percentage'

I want to show this maximum in the barchart (black bars) but the heights of the bars don't match with the numbers in the table.

The maximums in the table are

- 60% for Financial Institutions

- 40% for Agribusiness

- 40% for Energy

but the black bars all are at 47% (which is the average of 60%, 40% and 40%).

Does anyone know how to solve this?

Thanks,

Mirjam

 

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @Anonymous,

 

I think you need to add a condition to filter calculate average based on current label category. 

Sample measure:

Average =
CALCULATE ( AVERAGE ( Table[amount fund] ), VALUES ( Table[Sector] ) )

 

If above not help, please share some sample data for test.


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi Xiaoxin,

Thanks for your response. Your suggested formula doesn;t work because the formula AVERAGE only has 1 argument (and you gave 2).

 

This is the formula that I have used for calculating the percentage of the amount fund:

Pct amounts fund = divide (sum(ELF_Pipeline[Amounts Fund]),CALCULATE(sum(ELF_Pipeline[Amounts Fund]),ALL(ELF_Pipeline)))

 

Can you see what I did wrong. I'm not sure how I can share the data

 

Mirjam

Hi @Anonymous,

 

Please share a pbix file with some sample so that we can test and coding formula on it. (you can upload it to onedrive and share link here)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.