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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
james
Creator III
Creator III

Toggle select value with Set Analysis with AGGR

All,

I am able to select a field  called 'Item' using toggle select and the search string as follows

='=(sum(aggr(DISTINCT

if((Sum([Full Consumption])/Sum([Onhand USD])) <4.0,

Count( Item),0),

Item) ))'

However, once i try to introduce Set analysis into this expression, it wont render...

='=(sum(aggr(DISTINCT

if((Sum({$<Level_Flag= {'0'},Filter = {'1'}>} [Full Consumption])/Sum({$<Level_Flag= {'0'},Filter = {'1'}>} [Onhand USD])) <4.0,

Count( Item),0),

Item) ))'

any ideas on a workaround???

1 Solution

Accepted Solutions
swuehl
MVP
MVP

That's probably due to the single quotes in your set modifiers being misinterpreted.

Try

='=(sum(aggr(DISTINCT

if((Sum({$<Level_Flag= {0},Filter = {1}>} [Full Consumption])/Sum({$<Level_Flag= {0},Filter = {1}>} [Onhand USD])) <4.0,

Count( Item),0),

Item) ))'

or

='=(sum(aggr(DISTINCT

if((Sum({$<Level_Flag= {"0"},Filter = {"1"}>} [Full Consumption])/Sum({$<Level_Flag= {"0"},Filter = {"1"}>} [Onhand USD])) <4.0,

Count( Item),0),

Item) ))'

View solution in original post

2 Replies
swuehl
MVP
MVP

That's probably due to the single quotes in your set modifiers being misinterpreted.

Try

='=(sum(aggr(DISTINCT

if((Sum({$<Level_Flag= {0},Filter = {1}>} [Full Consumption])/Sum({$<Level_Flag= {0},Filter = {1}>} [Onhand USD])) <4.0,

Count( Item),0),

Item) ))'

or

='=(sum(aggr(DISTINCT

if((Sum({$<Level_Flag= {"0"},Filter = {"1"}>} [Full Consumption])/Sum({$<Level_Flag= {"0"},Filter = {"1"}>} [Onhand USD])) <4.0,

Count( Item),0),

Item) ))'

james
Creator III
Creator III
Author

Yes the single quotes was the issue...

Thanks