Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
fe-c
Contributor III
Contributor III

custom tooltip on stacked bar chart

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. 

 

Labels (4)
3 Replies
KGalloway
Creator II
Creator II

I think I found what you need: =sum(total aggr(sum(amount), group, date))

 

KGalloway_1-1696608325710.png

 

 

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
]
;

fe-c
Contributor III
Contributor III
Author

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.

KGalloway
Creator II
Creator II

Do you want the sum of all groups in each date? Like this:

KGalloway_0-1697038083168.png

 

Or the sum of all dates in each group?