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: 
HeadyFinance
Contributor
Contributor

Aggregate Rows Based on Dimension Names

Hiya!

As the title says, I'd like to aggregate rows based on the name of a dimension.

See tables below for clarity.

Current Output
Market Net Sales Returns Return Rate (%)
US 100 10 10%
UK 70 8 11%
DE 60 6 10%
PT 30 5 17%
CK 20 4 20%
IT 10 3 30%

 

Desired Output
Market Net Sales Returns Return Rate (%)
US 100 10 10%
UK 70 8 11%
DE 60 6 10%
Rest-of-world 60 12 17%

 

So I'd like an output where every market that isn't the UK, US or DE to be in a aggregate Rest-of-world row.

So far I've tried

Aggr(if(Market<>["US","UK","DE"],Market),Market)

, but that didn't yield the above results unfortunately.

Thanks so much!

Labels (2)
1 Reply
rubenmarin

Hi, the syntax for that expression would be:

Aggr(If(not Match(Market,'US','UK','DE'), 'Rest-of-world',Market),Market)