Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

make chart with sum from count of pivot table

Hi

what if i have this table: Is it possible to count the sum of same model types and to put that in to a chart?

table.png

8 Replies
michael_maeuser
Partner Ambassador
Partner Ambassador

Hi,

not sure if I understand you right, but can´t you just create a chart with dimension model types and just count them without distinct?

MK_QSL
MVP
MVP

Create a Bar Chart

Dimension

MODEL

Expression

COUNT(Distinct SERIAL_NUMBER)

or

COUNT(SERIAL_NUMBER)

Not applicable
Author

Sorry i didnt mention,

that the models will only be counted on a certain condition. For example if the SN comes more then 2 times in the table between a certain date. So for example Model  ME571K in normal table without the expression can come more then 1000 times but if you get this pivot table then it might occur for example like 10 times. so for example in this table you can have count 2, 2, 2, 2, 2.. These i need sum and in the totals of all that models i want in a bar chart.

Not applicable
Author

see my comment above.

MK_QSL
MVP
MVP

Kindly provide sample data in excel file along with your expected result...

Not applicable
Author

Serial_NOModel
1A
2B
3C
4D
5A
6FA
7G
8A
1A
1A
2B
4D
5A
Pivot table
Serial_NOCOUNT SERIALMODEL
12A
21B
42D
52A

As you can see in the first table you will have serial numbers with certain models.

the second pivot table is a table which counts the same serial numbers on a certain date(as you can see the 1st serial number is actually 3 times but the third is not in the date range so you only have count 2).. Now you see that in the first table the model A is occuring 5 times. in the pivot table because of the code it occurs 2 times but if you see that there is count 2 on serial number than you will have total of 4 model of type A.. So for example this 4 times of model A i want to have in a chart..

MK_QSL
MVP
MVP

Where is the Date Range in your Sample Data?

Not applicable
Author

i just need to make that pivot table in to this and ignore the total amounts(the date range is an example, so you know i filter the data):

table.png