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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Set Analysis Question.....

Does anyone see any problems with this statement? I keep getting the error Error in set modifier ad hoc element list

Thanks

Thom

Sum

({<[Billing Type] = {"L2" "F2" "FV"}>} [Inv Gross], [Inv Gross] * -1)





1 Reply
johnw
Champion III
Champion III

A couple issues. First, set analysis isn't for "if this case, then this, else this." If that's what you want, just use an IF:

sum(if(match([Billing Type],'L2','F2','FV'),1,-1)*[Inv Gross])

If you only wanted to sum up those specific billing types, you can do that with set analysis, but I believe your values should be in single quotes and separated by commas. Also, I believe you can skip the single quotes since your values don't have spaces:

sum(<[Billing Type]={'L2','F2','FV'}>}[Inv Gross])
sum(<[Billing Type]={L2,F2,FV}>}[Inv Gross])

Or if by the double quotes you meant that L2, F2 and FV are actually fields in your model, that gets a lot more complicated. Basically you concatenate the possible values together with single quotes around them inside of a dollar sign expansion, I believe.

Edit: Oops. Never mind. Double quotes are allowed. This should be perfectly valid:

sum(<[Billing Type]={"L2","F2","FV"}>}[Inv Gross])