Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys,
I have a question concerning partial sums in a pivot table.
You can find a file underneath.
The idea of the exercise:
*EENHPR is the price per unit (ton) of an article (Artikelnr)
*Sales2013 is the total sales of that unit (in yr 2013, or 2012)
I now want to calculate the tons that have been sold per article, so basic math: Sales/EENHPR = tons
I need to know the total tons per Name (partial sum Artikelgroep3) and the total tons per Article (partial sum Artikelnr)
As you can see, it does not want to show me the total amount (partial sums)..
Who can help me out?
Cheers,
Zipke
Dear,
The nodistinct does not change anything.
At the moment I have the correct calculation for the selected year and month, but the year-1 is giving me the wrong calculation.
Is it possible that it has got something to do with my calculated dimension? Because in the calculated dimension I only talk about only(Year) and not about only(Year-1)
The calculated dimension is:
=aggr(if(rank(aggr(sum({<Artikelgroep3={'42110 GIPS ZAKGOED','42210 GIPS SILO','42220 GIPS ZAK M'}, Jaar={$(=only(Jaar))}>}OmzetBedrag),KlantNaam))<=3,KlantNaam),KlantNaam)
and the expression for my year-1 is
=sum(aggr(nodistinct sum({<Artikelgroep3={'42110 GIPS ZAKGOED','42210 GIPS SILO','42220 GIPS ZAK M'}, Jaar={$(=only(Jaar-1))}>}OmzetBedrag)
/
max(EENHPR), KlantNaam, Artikelgroep3, Artikelnr, Artikelomschrijving, EENHPR)
)
(with or without the nodistinct does not change anything)
Since only the year-1 is showing me somehting weird 641,14€/223 = 0€??? I think it must have got something to do with the years..?
Thank you ![]()
Try moving the -1 out of the only function:
=sum(aggr(nodistinct sum({<Artikelgroep3={'42110 GIPS ZAKGOED','42210 GIPS SILO','42220 GIPS ZAK M'}, Jaar={$(=only(Jaar)-1)}>}OmzetBedrag)
/
max(EENHPR), KlantNaam, Artikelgroep3, Artikelnr, Artikelomschrijving, EENHPR)
)
Yer I also thought that was the problem, but that did not change anything so I put it back to only(Year-1), it's the same result unfortunately..