Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

wrong total sum over column

Hello everybody,

i have an Pivot table with Prices of the actuale year "Preis", Prices of previous year "Preis_Vorjahr", the % change of the Price "relative Abweichung", the costs of the goods last year "Warenkosten VJ" and the calculated value with the Price cange "Warenkosten progn.".

The total sum of the calculated new Price column gives a difference of 0,02€.

Can somebody explain it or give me an example, how to do it right?

The column "Warenkosten progn." is wrong, the correct sum of the rows is  979,57 not 979,55

Thanks to all


12 Replies
Not applicable
Author

cool, super, very good!

rbecher
MVP
MVP

..or this expression (simplified):

=sum(round(Warenkosten_VJ*((Preis/Preis_Vorjahr-1)/100+1),0.01))

Astrato.io Head of R&D
Not applicable
Author

Hallo everybody. My solution now inlcudes the following statement:

sum(aggr(round(sum({<Jahr={$(=getfieldselections(Jahr)-1)}>} Lieferantenstatistik.Umsatz)*(Sum({<Jahr={$(=getfieldselections(Jahr))}>} ItemPosition.Preis_BE)/Sum({<Jahr={$(=getfieldselections(Jahr)-1)}>} ItemPosition.Preis_BE)-1)/100+sum({<Jahr={$(=getfieldselections(Jahr)-1)}>} Lieferantenstatistik.Umsatz),0.01),Warengruppen.Name_1,Referenztabelle_Warenkorb.Warengruppe,ItemHeader.Description,ItemPosition.LieferantenArtikelNr))

my Problem after getting the Expression from Ralf Becker was that i have had used variablenames instead of the expressions.