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

Labels on graphs with different data than represented by the bars

Hi,

I made a bar stacked bar chart, with data on the on time arrival of trucks. I'm showing what percentage of trucks arrive on time, what percentage within 30 minuts of their booked time, which within 60 minutes, etc. So I made the following expressions in my chart:

1) =sum[On time]) / Count[PO Number])
2) =sum[On time + 30]) / Count[PO Number]) - sum[On time]) / Count[PO Number])

3) =sum[On time + 60]) - sum[On time + 30])

4) etc.

(When the goods are on time, I gave it the value of 1, if late 0 in mij [On time], that's why I can do the sum formula)

So my bars represent percentages, but as labels I want to put the actual number PO numbers related to the parts of my stacked bars. How do I do this?

3 Replies
Gysbert_Wassenaar

You can use the dual function for this. Something like dual( Count[PO Number] , sum[On time]) / Count[PO Number]) )


talk is cheap, supply exceeds demand
Not applicable
Author


Hi Gysbert,

Thank you for your help. I see that if I use this formula, when I press the charts, it switches between the two datasets. So it does not exactly do what I hoped for, but it is an alternative if it is not possible to put different datalabels on the chart.

However, if I make this switch, my Y-axis still shows the data as a percentage (so in stead of 700 loads, it shows 700%). How do I let the chart itself change too?

Not applicable
Author

Insert a conditional number format with an if statement:

ie.

if(....,num(....,'#.##0'),num(....,'#.##0%')