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: 
G3S
Creator III
Creator III

Exclude one filter selection in Set Analysis

the Master measure at the moment is:
sum(aggr(sum(distinct Allocation),Key1_Carrier))

this calculates the Allocation per carrier. values from "Carrier_Filter " will be selected by user and the above measure works for selections. what would be the set analysis for ignoring the selection made in 'Carrier_Filter" by user but keep any other filter selections made by user? 

sum({1}aggr(sum(distinct Allocation),Key1_Carrier)) isn't returning the values properly. appreciate your help please

Labels (4)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

Sum({<Carrier_Filter=>} Aggr({<Carrier_Filter=>} Sum({<Carrier_Filter=>} DISTINCT Allocation),Key1_Carrier))

View solution in original post

7 Replies
BrunPierre
Partner - Master
Partner - Master

Sum({<Carrier_Filter=>} Aggr({<Carrier_Filter=>} Sum({<Carrier_Filter=>} DISTINCT Allocation),Key1_Carrier))

Lisa_P
Employee
Employee

Try this:
sum({<Carrier_Filter >}aggr(sum({<Carrier_Filter >}distinct Allocation),Key1_Carrier))

This will allow selections except for "Carrier_Filter" at both sum aggregations.

G3S
Creator III
Creator III
Author

@Lisa_P 

Your syntax also works. thank you. 

G3S
Creator III
Creator III
Author

@Lisa_P 

Your syntax also works. thank you. 

G3S
Creator III
Creator III
Author

for another measure I am aggregating then performing sum. 

sum(aggr(ShippedTEU,CntrSeal))

I tried this way, but it is still considering selection.. what am I missing here?

sum({<Carrier_Filter=>} Aggr({<Carrier_Filter=>}ShippedTEU,CntrSeal))

Lisa_P
Employee
Employee

There is no aggregation for aggr function, it will create an array of values for ShippedTEU by CntrSeal. If you do use Sum(ShippedTEU) you can stop selections being applied to ShippedTEU - Sum({<Carrier_Filter=>} ShippedTEU) 

G3S
Creator III
Creator III
Author

ShippedTEU needs to be calculated as an aggr.

sum(aggr(ShippedTEU,CntrSeal))

is there any other workaround to ignore user selection and get the shipped TEU?

perhaps set analysis for user selection + set analysis for values <> user selection?