Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

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
Anil_Babu_Samineni

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

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