Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set syntax not working when having two sets in the expression

Hi,
I have a real hard time getting the set expression working. These two expressions works perfectly:

SUM({<[key_Week] = {">=$(vP1Start) <=$(=vP1End)"}>} [BB_Net_USD])

or

Sum({$<Currency_ISO_CD=>} {$<Unit_type=>} {$<Filter_Product=>}[BB_Net_USD])

But when I try to do this

Sum({$<Currency_ISO_CD=>} {$<Unit_type=>} {$<Filter_Product=>}

{<[key_Week] = {">=$(vP1Start) <=$(=vP1End)"}>} [BB_Net_USD])

The first section is ignored, the result is the same than the first formula I show. I would expect the number to be much higher.

I have been trying different things for hours and asked a couple colleagues to no avail. Is it possible to do this?

Thanks, Philippe

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Philippe,

only the first of all of your expressions can work properly. The rest are incorrect.

Each aggregation function, such as sum(), can only have one Set Analysis expression. Within this single expression, you may use multiple Set Identifiers, if they are used with set operators. Each Set ID uses a single set of Modifiers, enclosed in angled brackets. Multiple modifiers are separated by commas. So, your second expression should look like this:

Sum({$<Currency_ISO_CD=, Unit_type=, Filter_Product= >}[BB_Net_USD])


Your third expression should be formulated like this:


Sum({$<Currency_ISO_CD=, Unit_type=, Filter_Product=, [key_Week] = {">=$(vP1Start) <=$(=vP1End)"}>} [BB_Net_USD])

cheers,

Oleg Troyansky

Come and learn Set Analysis with me at the Masters Summit for QlikView - www.masterssummit.com

View solution in original post

1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Philippe,

only the first of all of your expressions can work properly. The rest are incorrect.

Each aggregation function, such as sum(), can only have one Set Analysis expression. Within this single expression, you may use multiple Set Identifiers, if they are used with set operators. Each Set ID uses a single set of Modifiers, enclosed in angled brackets. Multiple modifiers are separated by commas. So, your second expression should look like this:

Sum({$<Currency_ISO_CD=, Unit_type=, Filter_Product= >}[BB_Net_USD])


Your third expression should be formulated like this:


Sum({$<Currency_ISO_CD=, Unit_type=, Filter_Product=, [key_Week] = {">=$(vP1Start) <=$(=vP1End)"}>} [BB_Net_USD])

cheers,

Oleg Troyansky

Come and learn Set Analysis with me at the Masters Summit for QlikView - www.masterssummit.com