Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Custom Tooltip for Stacked Bar Charts

I have a stacked bar chart showing number of employees per department.  The value is Count(Employee ID) with 2 drill down dimensions on the Y-Axis:  Department name and Subdepartment name. Then, the bars are stacked by whether they completed a training (Yes or No).

The tooltip shows number of employees that completed the training or not completed the training. However, I want to also show the total number of employees (completed + not completed) for the entire stack according to each Department/Subdepartment.  

This is similar to another community thread but the solution to show Count(TOTAL <Department> Employee ID) did not work for me so am still searching for a solution.  I am using Qlik Sense Enterprise online and cannot attach a qvf. Instead, I hope the attached image helps explain what I mean. Any ideas are welcomed.

1 Solution

Accepted Solutions
Highlighted
Contributor II
Contributor II

I figured out it wasn't working because the field was aliased in script editor:
    Load
         RESULT as 'Completion Status'

So, I loaded RESULT twice in script editor, once as 'Completion Status' for other purposes in my dashboard and another with no alias for the tooltip calculation. Once I excluded selections on the original RESULT field (by encasing in {<>} and setting it = to nothing) it worked and the tooltip displayed the total number of people within the stack, whether they took the training or not. 

   Incorrect Formula:  Count(TOTAL {<Aliased_Field=>} EMPLID)

   Correct Formula:     Count(TOTAL {<Original_Field_No_Alias=>} EMPLID)

View solution in original post

2 Replies
Highlighted
Partner
Partner

Hi Melissa,

your count expression seems to have a syntax error. Try to remove the curly brackets and leave it like this:

Count(Total <DEPARTMENT_CODE> EMPLID)

Highlighted
Contributor II
Contributor II

I figured out it wasn't working because the field was aliased in script editor:
    Load
         RESULT as 'Completion Status'

So, I loaded RESULT twice in script editor, once as 'Completion Status' for other purposes in my dashboard and another with no alias for the tooltip calculation. Once I excluded selections on the original RESULT field (by encasing in {<>} and setting it = to nothing) it worked and the tooltip displayed the total number of people within the stack, whether they took the training or not. 

   Incorrect Formula:  Count(TOTAL {<Aliased_Field=>} EMPLID)

   Correct Formula:     Count(TOTAL {<Original_Field_No_Alias=>} EMPLID)

View solution in original post