Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
amiumi66
New Contributor III

conditional sum in pivot


StudentName
ScoreAge

A

5521
A4319
A5518
B55

27

B43

18

B4417
B3318
B4325

How can i create a pivot with subtotal of score only if Age is less then 20. Sub total will ignore the score for Age higher then 20.

1 Reply

Re: conditional sum in pivot

May be this?

LOAD StudentName,

     Score,

     Age

FROM

[https://community.qlik.com/message/1256839]

(html, codepage is 1252, embedded labels, table is @1);

Create Pivot Object and use Dim as StudentName

Expression is Sum({<Age = {'<20'}>}Score)

Go to Presentation tab and check the Partial Sum if you need

Capture.PNG

Life is so rich, and we need to respect to the life !!!
Community Browser