Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

Needed Total horizontally as well as vertically

Hello Everyone,

I have a requirement in which I needed the Grand Total horizontally as we as Vertically but the problem is I am getting Vertical total only ,the requirement is like I need Horizontal total for 2 columns POL and PRE and POK total should be included in PRE , I am attaching the sample application the table used should be pivot as the client is specific with the look and feel .I have tried all possibilities if ant one aware of please reply.

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Somehow, I have managed to display the output which you showed in above reply.

Capture.PNG

View solution in original post

14 Replies
Gysbert_Wassenaar

Try this expression:

=Sum(Aggr(

     Pick(Match(Values,'POL','PRE','POK'),

     Sum(Return),Sum([Life Insured]),Sum(TP))

,State,LOB,Values))


talk is cheap, supply exceeds demand
Chanty4u
MVP
MVP

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Gysbert ,

My requirement is I needed 2 Total horizontal columns one for PRE and one for POL and the column POK should get added with PRE total . This is how they want the look of the application .

tamilarasu
Champion
Champion

Hi,

Check the attachment,

=If(SecondaryDimensionality()=0,

              RangeSum(Sum({<Values ={'POL'}>}Return),Sum({<Values ={'PRE'}>}[Life Insured]),Sum({<Values ={'POK'}>}TP)),

                  Pick(Match(Values,'POL','PRE','POK'),Sum(Return),Sum([Life Insured]),Sum(TP))

    )


Capture.PNG

Gysbert_Wassenaar

I don't understand the requirement. Can you show me what the result should look like?


talk is cheap, supply exceeds demand
ferha_jafri
Partner - Creator III
Partner - Creator III
Author

After taking the aggr I got the same but the result should have 2 Total columns one for POL and for for PRE and POK should be added to PRE.

tamilarasu
Champion
Champion

Could you post your expected output in excel.?

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Sample-SS.PNG

This is what I wanted.

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Please check the screen shot added.