Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a pivot table as shown below. there is an expression which calculates the % which is working per line but the subtotals and totals are not working. (As you can see it shows 33.33% for each.
Does anyone know how i can fix this please?
The expressions used are ..
Score
Sum(Score)
Percentage
=sum(Score)/sum({<City=>}(aggr(NODISTINCT sum( Score), Country)))
Try:
if(Dimensionality()=3, sum(Score)/sum(total <Country,Continent> Score),
if(Dimensionality()=2, sum(Score)/sum(total <Continent> Score),
sum(Score)/sum(total Score)))
Hi
Try this:
=sum(Score)/sum(TOTAL<City> aggr(sum(Score),Continent,Country, City))
TMF
Message was edited by: tmendesf
Hi TMF,
That works for the totals but now each line reports as 100% as below
Hi
Try this:
=sum(Score)/sum(TOTAL<City> aggr(sum(Score),Continent,Country))
TMF
Hi, thanks again but now im getting some lines reporting nothing..
Nottingham for example should be reporting 20/35*100 = 57.14% but is showing -
Can you post a sample file?
Hi, yes here is a sample
Try:
if(Dimensionality()=3, sum(Score)/sum(total <Country,Continent> Score),
if(Dimensionality()=2, sum(Score)/sum(total <Continent> Score),
sum(Score)/sum(total Score)))