Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

partial subtotal in pivot table

Dear all,

I've met a qlikview problem. Anyone could help?

I set a subtotal base on the field of col1 but I only need the subtotal of A and B. how could I hide the subtotal of C?

123.png

Many thanks.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

If (Dimensionality()=1,if( Col1<>'C', Sum(Value)), sum(Value))

See, in my sample 'Ajith C' doesn't have sub total:

Capture.JPG

View solution in original post

7 Replies
Anil_Babu_Samineni

We don't have future for Sub total like =Not WildMatch(col1,'C'). Would you like to go work around?

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
luismadriz
Specialist
Specialist

Hi,

This is a workaround for that,

This is what I loaded:

load * inline [

col1,col2,value

A,a,1

A,b,1

B,c,1

B,d,1

B,e,1

B,f,1

C,g,1

C,h,1

C,i,1

C,k,1];


load * inline [

Dim

1

2];


Then a pivot table with

first dimension

col1


second dimension

=if(Dim=1,col2,if(col1<>'C','subtotal'))


Measure

sum(value)


don't enable Totals


And this is what it looks like:

Untitled.png


I hope this helps,


Cheers,


Luis

Anil_Babu_Samineni

Or, this for second expression

=If(col1='A' or col1 = 'B',Pick(Dim, col2, 'Sub Total'), col2)

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
tresesco
MVP
MVP

Try like:

If (Dimensionality()=1,if( Col1<>'C', Sum(Value)), sum(Value))

See, in my sample 'Ajith C' doesn't have sub total:

Capture.JPG

luismadriz
Specialist
Specialist

Maybe QSense is lacking this ability but I tried it and couldn't get rid of the word Total. for 'C'. I also didn't include null values

Untitled.png

Is there anything else you did in QView on the properties to remove the word Totals?

Cheers

Luis

tresesco
MVP
MVP

Only 'Suppress Zero' is what extra I needed in qv. Did not try in QSense.

Anonymous
Not applicable
Author

‌that’s Cool. Thank u so much.

BTw, could I know where to input the expression (if blala)?