Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Sunset1215
Contributor
Contributor

Stacked bar chart each bar showing same values

Good afternoon,

I'm brand new to Qlik Sense so apologies if this is a rudimentary issue. I'm trying to create a stacked bar chart that shows a distinct count of documents that contain errors by error type. I'm trying to show this data for 3 departments and if a user clicks on one of the bars, it shows a more granular view and also adjusts the data showing in a table and another chart that I have on the sheet. My issue is that when I'm viewing the bar chart at the higher level (no filters, showing all 3 departments) the numbers for each error type is the same for each department (it seems to be showing the sum of all departments for each department which is incorrect).

EX:
Dept1 shows invalid date = 68, blank name =47, missing approval = 21
Dept2 shows invalid date = 68, blank name =47, missing approval = 21
Dept3 shows invalid date = 68, blank name =47, missing approval = 21

But once I click on one of the bars to view the details for that department, it shows the correct numbers.

EX:
Dept1 shows invalid date = 32, blank name =17, missing approval = 7
Dept2 shows invalid date = 14, blank name =12, missing approval = 9
Dept3 shows invalid date = 22, blank name =18, missing approval = 5

Can anyone help me understand how to get the correct numbers to show at the higher level (without having to click on a bar)?

I appreciate any assistance!

Labels (6)
1 Solution

Accepted Solutions
Sunset1215
Contributor
Contributor
Author

Unfortunately, I'm unable to share a sample set of my data but I have tried to create a mockup of the expected output.

The expressions that I'm using are:

invalid_dt measure - sum(total aggr((invalid_dt), document_number))
blank_name measure - sum(total aggr((blank_name), document_number))
missing approval measure - sum(total aggr((miss_appr), document_number))

This is the current view when I open the worksheet. See how each dept is showing the same values (it is summing up the data for all departments and displaying that total for each department).

Sunset1215_0-1692188677041.png

When I click on the Dept1 bar in the above view, it drills down to the offices within Dept1 and shows the correct numbers for each office and their respective categories.

Sunset1215_1-1692188775354.png

I need the initial view when I open the worksheet to show the correct numbers at the Dept level like this

Sunset1215_2-1692188959088.png

Thank you for any assistance!

 

 

View solution in original post

3 Replies
G3S
Creator III
Creator III

are you able to share a sample set of your data and mockup of expected output? 

also the expression you are using to calculate in the charts

Sunset1215
Contributor
Contributor
Author

Unfortunately, I'm unable to share a sample set of my data but I have tried to create a mockup of the expected output.

The expressions that I'm using are:

invalid_dt measure - sum(total aggr((invalid_dt), document_number))
blank_name measure - sum(total aggr((blank_name), document_number))
missing approval measure - sum(total aggr((miss_appr), document_number))

This is the current view when I open the worksheet. See how each dept is showing the same values (it is summing up the data for all departments and displaying that total for each department).

Sunset1215_0-1692188677041.png

When I click on the Dept1 bar in the above view, it drills down to the offices within Dept1 and shows the correct numbers for each office and their respective categories.

Sunset1215_1-1692188775354.png

I need the initial view when I open the worksheet to show the correct numbers at the Dept level like this

Sunset1215_2-1692188959088.png

Thank you for any assistance!

 

 

G3S
Creator III
Creator III

what is the outcome if you remove 'total' from your expression?