Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, stalwar1 , vinieme12
I have the following table :
I'm using this expression:
if(Dimensionality()=1, sum(Taux)/sum(total Taux),
if(Dimensionality()=2,
sum(Taux) /sum(total Taux) ))
What I want is, when dimensionality()=2, to have sum(Taux) / sum(Taux) of the first dimension; the pourcentage of each plaque % its Type Materiel and not % Total
How to achieve this? Thanks
I think this
if(Dimensionality()=1, sum(Taux)/sum(total Taux),
if(Dimensionality()=2,
sum(Taux) /sum(total <[Type Materiel]> Taux) ))
Try
Sum(TOTAL <[Type Materiel]> Taux)/Sum(TOTAL Taux)
Regards,
Antonio
I think this
if(Dimensionality()=1, sum(Taux)/sum(total Taux),
if(Dimensionality()=2,
sum(Taux) /sum(total <[Type Materiel]> Taux) ))
Yes, based on Antonio's response, this is how I altered my expression as so, But that does not seem to work.
In fact, if I sum( the 0.64%) it would be much greater than 16.29%..
I think Vineeth's expression is slightly different... try using his expression and I am sure it will work for you
This is the expression I'm using:
if(Dimensionality()=1, sum(Taux)/sum(total Taux),
if(Dimensionality()=2,
sum(Taux) /sum(total <[Type Materiel]> Taux) ))
If you want sum of rows to add up to the total... you will need the same denominator for both of them.... In that case your original expression (without needing dimensionality()) would give you that
sum(Taux)/sum(total Taux)
Now when you sum each 0.10... and all... they would sum upto 16.29%.... using different denominator will never give you the sum
What an idiot I am
This is normal; if I sum them up, the sum would be 100% since they represent 100% of their Material Type..
Haa, and that was so obvious..
Well, thanks guys !
between,
Sum(TOTAL <[Type Materiel]> Taux)
is like saying
aggr(Sum(TOTAL Taux),[Type Materiel]) ?
Maybe, the syntax of the second expression won't work, but this is what It's doing?
More like this
Aggr(NODISTINCT Sum(Taux), [Type Materiel])