Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
benjamin_rhinos
Contributor
Contributor

% 3 dimensions

Hello, I want to calculate the% of my turnover by product family on the total turnover.

I have 3 dimensions : nomenclature 1 / nomenclature 2 / nomenclature 3

- the% of the nomenclature number 1 s / total digit => OK

- the% of the nomenclature number 2 s / total nomenclature 1 => NOT OK

- the% of the nomenclature number 3 s / total nomenclature 2 => OK

I do not understand why 2nd is not working. 

Scripts used :

  If (dimensionality () = ('1'),

Sum ([PV HT]) / sum (TOTAL [PV HT]),

If (dimensionality () = ('2'),

Sum ([PV HT]) / sum (TOTAL <[Nomenclature 1]> [PV HT]),

If (dimensionality () = ('3'),

Sum ([PV HT]) / sum (TOTAL <[Nomenclature 2]> [PV HT])

)))) 

Thank you for your help

18 Replies
sunny_talwar

Would you be able to share a sample to show the issue?

benjamin_rhinos
Contributor
Contributor
Author

Below screenshot of my erroneous result.
"BEAUTE ET LUXE" => result OK
"BAGAGERIE" => result NOT OK
"ACCESSOIRES BAGAGERIE" => result OK



thank you in advance

sunny_talwar

Can you create a new expression

Sum(TOTAL <[Nomenclature 1]> [PV HT])

What value do you get here?

benjamin_rhinos
Contributor
Contributor
Author

I get the total of "CA HT 2017": 202733 euros


It's weird ...

sunny_talwar

So right now you are getting 973/202733, whereas you want 973/10528? Is that right?

benjamin_rhinos
Contributor
Contributor
Author

That's right

sunny_talwar

Is BAGAGERIE part of [Nomenclature 1]?

benjamin_rhinos
Contributor
Contributor
Author

No, it is part of "Nomenclature 2"

sunny_talwar

Can you try this for dimensionality() = 2

Sum([PV HT]) / sum (TOTAL <[Nomenclature 1], [Nomenclature 2]> [PV HT])