Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot Table Partial Sums

Hi All

I need to create three columns as shown below,

Sample.PNG

Can anyone help me on framing a expression for the third column i.e 'Needed Value' (Highlighted in Yellow)

The calculation logic is explained in the section which is highlighted in red.

Thanks

Koushik

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=Sum(TOTAL <StudName> Aggr(RangeSum(if(Sum(Theory) < 80 , Sum(Theory)*0.5, Sum(Theory)*0.4),

   if(Sum(Practical) < 80 , Sum(Practical)*0.5, Sum(Practical)*0.4)), StudName, Subject))

View solution in original post

6 Replies
sunny_talwar

May be this:

RangeSum(Sum(Theory), Sum(Practical))/RangeSum(Sum(TOTAL <Name>Theory), Sum(TOTAL <Name>Practical))

Colin-Albert

Can you post an example app so we can see the actual dimension names, field names and expressions you are using.

sunny_talwar

Or may be even this:

Sum(Theory + Practical)/Sum(TOTAL <Name>Theory + Practical)

Anonymous
Not applicable
Author

Thanks for the reply Sunny. Please find the attached QVW.

My actual QVW has additional calculations to be performed.

Can you help me in fixing the expression in QVW.

Please let me know if more information is required.

sunny_talwar

Try this:

=Sum(TOTAL <StudName> Aggr(RangeSum(if(Sum(Theory) < 80 , Sum(Theory)*0.5, Sum(Theory)*0.4),

   if(Sum(Practical) < 80 , Sum(Practical)*0.5, Sum(Practical)*0.4)), StudName, Subject))

Anonymous
Not applicable
Author

Thanks Sunny.

Regards

Koushik