Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to create a custom tooltip for a stacked bar chart. I just want to display the sum (values) of all dimensions over timeline (x-axis) in one tooltip. I thought it should be a simple combination of aggr & set analysis, but unfortunately I can't figure out a correctly working formula.
Maybe someone has a little clue.
I think I found what you need: =sum(total aggr(sum(amount), group, date))
This gives the sum of values in all groups over all dates in the tooltip. Is that correct?
Here is the data I used:
table:
load * inline [
date, amount, group
1/1/2023, 1, a
1/2/2023, 1, a
1/3/2023, 1, a
1/4/2023, 1, a
1/5/2023, 1, a
1/6/2023, 1, a
1/1/2023, 1, b
1/2/2023, 1, b
1/3/2023, 1, b
1/4/2023, 1, b
1/5/2023, 1, b
1/6/2023, 1, b
1/1/2023, 1, c
1/2/2023, 1, c
1/3/2023, 1, c
1/4/2023, 1, c
1/5/2023, 1, c
1/6/2023, 1, c
]
;
Hello KGalloway,
that is not the solution I am looking for. To be a little more specific, based on your example I want to show sum of a, b and c each time in the tooltip so that the user can see the complete data on a single 'mouse over' when the chart is to small/detailed to show single sums in the bars directly.
Do you want the sum of all groups in each date? Like this:
Or the sum of all dates in each group?