Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
great223
New Contributor

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.

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: partial subtotal in pivot table

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

Re: partial subtotal in pivot table

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
luismadriz
Valued Contributor

Re: partial subtotal in pivot table

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

Re: partial subtotal in pivot table

Or, this for second expression

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
MVP
MVP

Re: partial subtotal in pivot table

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

luismadriz
Valued Contributor

Re: partial subtotal in pivot table

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

MVP
MVP

Re: partial subtotal in pivot table

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

great223
New Contributor

Re: partial subtotal in pivot table

‌that’s Cool. Thank u so much.

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