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: 
Not applicable

List of values with set analysis


Hi everyone,

I am a little bit stucked in here. please help me out.

I need to get a list of values (society) which are filtered over multiple criterias.I can't do it with set analysis as it requires an aggregate.

I was only able to sum number of contract like this

Sum({$<[Type]={'Contract'},[Brand]={'xxx'},[Product]={'test'},[end of contract]={$(=$(vYesterday))}>} [contract counter])

Based on this set analysis I would need the list of customers which match.

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

To trim leading/trailing spaces you could use trim(). If possible try to share a sample qvw here.

Update: By the time try this expression in trigger search string:

='(' &Concat({$<[Type]={'Contract'},[Brand]={'xxx'},[Product]={'test'},[end of contract]={$(=$(vYesterday))}>} Distinct Society, '|') & ')'

View solution in original post

13 Replies
sushil353
Master II
Master II

Hi,

Try to use only() to get the list of values.

HTH

sushil

its_anandrjs
Champion III
Champion III

Write like

=Sum({$<[Type]={'Contract'}, [Brand]={'xxx'}, [Product]={'test'}, [end of contract] = {'$(=$(vYesterday))'} >} [contract counter])

Not applicable
Author

hi,

It doesn't work.

I want to display the values in a text box or a in list.

Not applicable
Author

no,

my formula is working for sum purpose. All I need is to get the list of associated values based on the criteria.

arjunkrishnan
Partner - Creator II
Partner - Creator II

Sum({<FieldName={'FieldValue'}>}MeasureFieldName)

eg:

Sum({<A={'Society'}>}contract counter)

tresesco
MVP
MVP

If you want the list in a text box separated by a delimeter, you can try with concat(), like:

Concat({$<[Type]={'Contract'},[Brand]={'xxx'},[Product]={'test'},[end of contract]={$(=$(vYesterday))}>} Distinct Society, ',')

sushil353
Master II
Master II

try this:

Only({$<[Type]={'Contract'},[Brand]={'xxx'},[Product]={'test'},[end of contract]={'$(vYesterday)'}>} [contract counter])


HTH

Sushil

Not applicable
Author

ok thanks. IT works. What if I want now to use this list to filter a straight table ?

tresesco
MVP
MVP

Say you want these Society values to be there in the dimension of straight table and an expression like: Sum(Amt). In such scenario, if you take Society as dimension and imply the same set anaysis with sum() like you have shown above, your dimension Society gets filtered for those values only.