Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get a percentage structure in pivot with tree

Hello

I have a pivot table created from a structure in Excel and data related from a qvd

First i´m not sure if this is the correct way to get this, i've been looking for a while and i have not seen anyone with this needs, but i don't think it's complicated

I need the percentage structure of each row with respect to the upper level

Ejemplo.jpg

But i can't get the sum of the upper level, this is what i need (E%)

quequiero.png

I hope you can help me in this

Regards

1 Solution

Accepted Solutions
Not applicable
Author

I time i implement something like this.

Sum(nValor)/

pick(dimensionality()+1,

Sum(total nValor),

aggr(Sum(nValor),concN1),

aggr(Sum(nValor),concN1,concN2))

try...

View solution in original post

3 Replies
Not applicable
Author

I time i implement something like this.

Sum(nValor)/

pick(dimensionality()+1,

Sum(total nValor),

aggr(Sum(nValor),concN1),

aggr(Sum(nValor),concN1,concN2))

try...

Not applicable
Author

Thanks rodrigo

With a little changes  IT WORKS !

I leave this here in case anyone need it

The final code was

Sum(nValor) /

Pick(Dimensionality(),

Sum(nValor),

Aggr(NODISTINCT Sum(nValor),concN1,nAnio),

Aggr(NODISTINCT Sum(nValor),concN1,concN2,nAnio),

Aggr(NODISTINCT Sum(nValor),concN1,concN2,concN3,nAnio))

Not applicable
Author

Goood!!!! its the ideia!

mark the correct awnser if corret for community stay organized! thanks