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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregating on dimension where the values are technically not assigned

Hi Qlikperts!

It's me again with a question

I have the business requirement to aggregate values on a dimension for information purposes, where they are technically not allocated.

I tried to build up a simplified version of that problem:

Here is the technically correct distribution of the values and how they would appear in the pivot table:

AS IS
YearDivisionProduct GroupProductAmount
AZProd1100
AYProd2200
AXProd4300
BZProd1100
BZProd1100
A--100
A--100

This is what the end-user wants to see:

TO BE
YearDivisionProduct GroupProductAmount
AZProd1400
AYProd2400
AXProd4400
BZProd1800
BZProd1500

Please notice, that the values, assigned to the dimension "division", but with no assigned dimensions Product Group and Product have to be aggregated on the rows where Product Group and Product are assigned. The rows with no assigned ProductGroup and Product have to be 'eliminated'

I am aware that this would make the amounts redundant, but this is intended by the user. It doesn't make sense in this case, but it's just an example

Additionally, I would like to solve this problem in the pivot table expression, not in the script, although I know it would be better to solve in the script, performance wise.

Any help is appreciated! Thanks in advance.

0 Replies