Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
krish2459
Creator
Creator

sub total in pivot table

Hi,

sub totals in pivot table not working in qliksense pivot table.

Please look into this.

 

krish2459_0-1619106051640.png

 

 

Thanks,

Krish

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Sum(Aggr(
if([Repeat Flag]='Yes' and (alt(1-(fabs(sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]))
/
avg({<Type={'Rolling 3'}>}total <Material,Plant>[Stock Value Main])*100),0) < '0.99') and

sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]) <'-1000',sum( [Amount LC]))
, Material, Plant, MonthYear, [Movemet Type]
))

View solution in original post

7 Replies
krish2459
Creator
Creator
Author

Hi,

 

Any suggestions please.

 

Thanks,

Krish

tresesco
MVP
MVP

What is your expression?

krish2459
Creator
Creator
Author

Expression 1:

if([Repeat Flag]='Yes' and (alt(1-(fabs(sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]))
/
avg({<Type={'Rolling 3'}>}total <Material,Plant>[Stock Value Main])*100),0) < '0.99') and

sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]) <'-1000',sum( [Amount LC]))

Expression 2:

 

if([Repeat Flag]='Yes' and (alt(1-(fabs(sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]))
/
avg({<Type={'Rolling 3'}>}total <Material,Plant>[Stock Value Main])*100),0) < '0.99') and

sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]) <'-1000',sum([Stock Value Main]))

 

Thanks,

Krish

krish2459
Creator
Creator
Author

Hi,

 

Any suggestions please.

 

Thanks..

tresesco
MVP
MVP

Try a quick fix. Put        Sum(...) around your expression. If this doesn't help, try to share your app with sample data.

krish2459
Creator
Creator
Author

Hi,

I'm getting "Nested Aggregation Not Allowed" error when using the "sum".

 

Attaching the application with sample data.

 

Thanks..

tresesco
MVP
MVP

Try like:

Sum(Aggr(
if([Repeat Flag]='Yes' and (alt(1-(fabs(sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]))
/
avg({<Type={'Rolling 3'}>}total <Material,Plant>[Stock Value Main])*100),0) < '0.99') and

sum({<[Movemet Type]={'701','702'},Type={'Rolling 3'}>}total <Material,Plant> [Amount LC]) <'-1000',sum( [Amount LC]))
, Material, Plant, MonthYear, [Movemet Type]
))