Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

Help creating a stacked bar chart where each stack has a calculation

I want to create the following chart but i cant quite get it to give the correct results.

My fields are:

SUPPLIER_ID

SPEND

SERVICE_DESC

Untitled.png

6 Replies
marcus_sommer

You could create such chart by using one dimension (your category) and in your case three expressions (top 10, next 10, others) and then choose as design stacked bar. To get both amounts within the bars and percentages on the axis you might need to create two charts which are overlaying eachother and are appropriate layouted (I have tried to adjust this with a dual-function but it didn't worked).

- Marcus

Kushal_Chawda

You can do something like below

I have create this using dummy data. You can change the expression accordingly

matthewp
Creator III
Creator III
Author

is there anyway to get this with  the relative percentage on the bottom~?

i know it can be done by SUM(Value)/SUM(TOTAL Value) but how can this be displayed on the axis?

marcus_sommer

Very probably it's only possible with my suggestion from above by using two charts - one with amounts and one with percentages.

- Marcus

Kushal_Chawda

Yes it is possible.. go to chart properties, presentation tab, add text in chart and put the above expression.. now press ctrl and shift to adjust the position of text

matthewp
Creator III
Creator III
Author

im having trouble getting this to work as there isnt an even number of suppliers distributed between categories in my data

nor is there an equal amount of money spent in  each category