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: 
Not applicable

Add count to pivot table

Hello,

I tried searching for a post in the forum that might help me but couldn't figure it out.

I want to create a count for my pivot table so that I can see how many refunds was given to an account for a certain reason.

For example:

I added the numbers next to each row that will count how many times adj.amount appears

Untitled.png

Thank you for all your help

16 Replies
sunny_talwar

May be we can collaborate. I will take first attempt and then you can come in to make modifications or improvements? Deal

Kushal_Chawda

hahaha ok. done

jagan
Partner - Champion III
Partner - Champion III

Hi,

Please find attached file for solution.

Script:

Table:

LOAD ACCOUNT, DESC,

Month(MONTH) AS MONTH,

VALUE

Inline [

ACCOUNT, DESC, MONTH, VALUE

A, ABC, 01/04/2016, 65

A, DEF, 01/04/2016, 357

B, GHI, 01/01/2016, 1089

C, JKL, 01/01/2016, 29

D, MNO, 01/04/2016, 27

F, PQR, 01/02/2016, 6

F, PQR, 01/02/2016, 1

F, STU, 01/01/2016, 73

F, STU, 01/02/2016, 80

F, STU, 01/03/2016, 108

F, STU, 01/04/2016, 9

];

Chart:

Dimensions: ACCOUNT, DESC, MONTH

Expression: =If(secondaryDimensionality(), Sum(VALUE), Count(Distinct MONTH))

Hope this helps you.

Regards,

Jagan.

Anil_Babu_Samineni

Sunny,

Getting same problem, If possible can you please attach one more time...

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Difficult to say without looking at it. Would you be able to share a sample?

Kushal_Chawda

Remove calculated dimension, apply ok. add it again. and drag it horizontal

jagan
Partner - Champion III
Partner - Champion III

Hi,

Did you checked my solution?

Regards,

Jagan.