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

Stacked Chart - Values and Labels

Hi,

My query is regarding stacked charts. My requirement is to create a stacked chart where the label is not equal to the value.

Consider an example where there is a stacked chart. X-axis (dimension) is Year (2011, 2012, 2013 and 2013) and Y-axis is the stacked data for total number of flights for various airlines companies (American Airlines, Air Asia, Qataar Airways) i.e gives the count. Now, for Air Asia in particular if the # of flights is 3000 then the label on the bar should read 'Three Thousand'. Is there a way to have the labels distinct from the values in stacked charts?

Thanks in advance!

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

Yes you can use a dual function in the expression, Dual(Text,Value) and check the values on datapoints and maybe the plot values inside segments in the presentation tab.

For example (you may have to change the text representation to your needs)

Dual(Sum(Amount)/pow(10,(len(Sum(Amount))-1))&' '&pick((len(Sum(Amount))-1),'(1)','(10)','thousands')

,Sum(Amount))

BarChDual.png

See also example attached

View solution in original post

3 Replies
stigchel
Partner - Master
Partner - Master

Yes you can use a dual function in the expression, Dual(Text,Value) and check the values on datapoints and maybe the plot values inside segments in the presentation tab.

For example (you may have to change the text representation to your needs)

Dual(Sum(Amount)/pow(10,(len(Sum(Amount))-1))&' '&pick((len(Sum(Amount))-1),'(1)','(10)','thousands')

,Sum(Amount))

BarChDual.png

See also example attached

Not applicable
Author

Thank you for the response! This solution worked perfectly for me!

happydays1967
Creator
Creator

Thanks! Saved a lot of time. One addition: on the 'Number' tab, set the number representation to 'Expression default' otherwise it will not show the text...

HP