Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Don't summated values in pivot table parent key

Hello.

I have the flollowing table structure:

Capturar.PNG

I made an pivot table with:

Dimensions - "PARENT" and "NODE".

Expression - Sum (Value).


And the result is like this:

Capturar.PNG


How to make the result be:

Capturar.PNG

If i made the table structure to be like this:

Capturar.PNG

It mess it up with the structure making two structures one with any nodes and the correct value and another summated with the value 497,

I'm not figuring this out, anybody know how to not summate in the first dimension and lookup for the value with the KEY?

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Just figure it out.

1 - Table with key / parent / node with the value of parent.

2 - The Set analysis was if node = parent then make the sum:

If ( Dimensionality() = 1,

  SUM({$<[Período - MES (seq)] = {1}, [pk_setor] = p([Setor - GNV])>} [Valor_Add])

If ( Dimensionality() = 2,

  if( [pk_setor] = ([Setor - GD]), 0,

SUM( {$<[Período - MES (seq)] = {1} >}[Valor_Add]) 

)

))

3 - Hide values = 0 so the parent don't get showed in the node tree.

I dont if this was the best choice but it works.

Hope it helps.

Best regards.

View solution in original post

1 Reply
Not applicable
Author

Just figure it out.

1 - Table with key / parent / node with the value of parent.

2 - The Set analysis was if node = parent then make the sum:

If ( Dimensionality() = 1,

  SUM({$<[Período - MES (seq)] = {1}, [pk_setor] = p([Setor - GNV])>} [Valor_Add])

If ( Dimensionality() = 2,

  if( [pk_setor] = ([Setor - GD]), 0,

SUM( {$<[Período - MES (seq)] = {1} >}[Valor_Add]) 

)

))

3 - Hide values = 0 so the parent don't get showed in the node tree.

I dont if this was the best choice but it works.

Hope it helps.

Best regards.