Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Pivot chart sub total conditions

Hi

In Pivot chart, I have dimension (location,item) , expressions(quantity,value). Here, I have value but quantity is zero for some items. I need to cut this value when quantity is zero. after that sub total(show partial columns - by checked) is having the total value(including value of zero quantity). So please give me suggestions.

my expression for Qunatity is == sum(PQTY-MQTY)

my expression for Value is == sum(PSTOCKVALUE-MSTOCKVALUE)

Expecting your reply.

Location         Item                 Qty           Value

Stores            Apple              5                   10

                     orange             12                  15

                       banana           0                    3

                       grapes            0                     2

                      pineapple          2                   6

                      total                19                  36

i need           

                      total                19                  31

Thanks

Kumar

16 Replies
Not applicable

Pivot chart sub total conditions

Hi,

If you need to show as below:

Location         Item                 Qty           Value

Stores            Apple              5                   10

                     orange             12                  15

                     pineapple          2                   6

                      total                19                  31

Use these Expressions:

Qty:sum(if(PQTY-MQTY>0,PQTY-MQTY))

Value:sum(if(PQTY-MQTY>0,PSTOCKVALUE-MSTOCKVALUE))

hope this helps you...!

rohit214
Contributor III

Pivot chart sub total conditions

hi

try this

in Script:

if(Qty=0 0r isnull(Qty='-1'),'0','1') as Flag

in expression:

sum(Qty*Flag)

Sum(Value*Flag)

may it hepls you

thanks

rohit

Not applicable

Pivot chart sub total conditions

where should i give this FLAG option

Pivot chart sub total conditions

Hi,

You have to use

Qunatity is ->  =sum(PQTY-MQTY)

Value is -> IF( sum(PQTY-MQTY) = 0, 0 , sum(PSTOCKVALUE-MSTOCKVALUE) )

Rgds

Anand

Not applicable

Pivot chart sub total conditions

still same answer is coming

sum of rows are not equal to total value

Re: Pivot chart sub total conditions

Hi,

See the attached sample file

Let me know about this.

Rgds

Anand

Not applicable

Pivot chart sub total conditions

hi

in straight table it is showing correct. please try in Pivot chart.

thanks

kumar

Not applicable

Re: Pivot chart sub total conditions

Hi,

see the attached file ,it is working fine.

Re: Pivot chart sub total conditions

HI,

See the attached it is working for both 

Rgds

Anand

Community Browser