
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sum of current column
Greetings
I'm trying to calculate the percentages based on the current column/dimensionality
table is like this
the Counts i got from crossing are correct but i want to for example the percentage of '18 ans - 24 ans' would be 11/65 which is the sum of that column in that dimensionality with that crossing betwen Center/ marque/trancheAge , i'm not sure if i made the point clear or not and the same thing would be for 'IFRUIT' it would be 65/ the sum of the rest of the column,
thank you for guiding me and helping in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@RyugaHideki Let's say your expression is "sum(Value)" then your % expression will become below
=sum(Value)/sum(total <Regions,Marques>Value)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that would not help with crossing if you're trying to change the dimensions order it would always show regions as 100%
if it helps the numbers are obtained by crossing those dimensions at a certain table since they're linked by Num or ID
Count({<TABLE={'A'}>} Num)
A is just an indicator of that table
there is a way of Counting at the data loader level of every possible crossing but when the data is massive it's not an optimal solution and displaying would be reliant on many conditions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@RyugaHideki You can adjust it using GetObjectField(). In case any dimension are changing dynamically you will not get any issues. Where GetObjectField(0) = first Row dimension and GetObjectField(2)= 1st column dimension. You can adjust it according to your need
Count({<TABLE={'A'}>} Num) /Count(total <[$(=GetObjectField(0))],[$(=GetObjectField(2))]>{<TABLE={'A'}>}Num)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i've done that approach before it's inconsistent
it shows 100% on the parent rows

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@RyugaHideki try below
=if( Dimensionality()=1,
Count({<TABLE={'A'}>} Num) /Count(total <$(=GetObjectField(2))]>{<TABLE={'A'}>}Num),
Count({<TABLE={'A'}>} Num) /Count(total <[$(=GetObjectField(0))],[$(=GetObjectField(2))]>{<TABLE={'A'}>}Num))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry for the late reply as i had to perform some tests and what you're trying to do essentially there is calculating based on the parent dimension which is something i've already done it's a nice approach but for example if you select one dimension it'll show 100% (an easy fix for that is remove
$(=GetObjectField(2))
in dimensionality=1 condition but anyway what i'm trying to achieve is shown in these pictures
notice how the results change for the region by changing the dimension position i'm trying to have fixed results
