Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
in attached document you'll see a pivot table. Depending on (no) values in column [ds%] the [Kg at 88%] is calculated.The values in that column [Kg at 88%] are correct. Except for the Grand Total which should be 2.115.293, which is the sum of all subtotals, instead of what qlikview calculates. (1.240.284)
Can anybody help me out on this one?
Thx in advance!
Bart
you need add Aggr function to the expression.
=
Sum(
Aggr(
if(sum(r4_ds)=0,
(if(sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)<>0,
sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)
))
,
(if(sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)<>0,
sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)
))
*
(
if(sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)<>0,
if(avg({< Rekening_Groep={'Aankoop voer'}>}if(r4_ds<>0,r4_ds))<>0,
avg({< Rekening_Groep={'Aankoop voer'}>}if(r4_ds<>0,r4_ds)) & '%'
))
)
/.88)
,Grootboek_Grootboekomschrijving, Transactie_Periode))
you need add Aggr function to the expression.
=
Sum(
Aggr(
if(sum(r4_ds)=0,
(if(sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)<>0,
sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)
))
,
(if(sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)<>0,
sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)
))
*
(
if(sum({< Rekening_Groep={'Aankoop voer'}>} r4_gewicht)<>0,
if(avg({< Rekening_Groep={'Aankoop voer'}>}if(r4_ds<>0,r4_ds))<>0,
avg({< Rekening_Groep={'Aankoop voer'}>}if(r4_ds<>0,r4_ds)) & '%'
))
)
/.88)
,Grootboek_Grootboekomschrijving, Transactie_Periode))
Hi Konstantins!
Thank you so much for the right answer!
Kind regards,
Bart