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: 
Mayank_Mohan
Partner - Contributor II
Partner - Contributor II

Only() in set Analysis

Hi all, 

I have a super-store sales dataset and i want to return the name of customer who have buy "Chairs" in year 2015 and 2017 using SET ANALYSIS.

I have tried this    Only({<[Sub-Category]={'Chairs'}>}[Customer Name])   ,   but did not get any result .

Can someone help me with query in set analysis. 

 

Thanks 

Labels (6)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you want a list of customers who purchased chairs:

Concat({<[Sub-Category]={'Chairs'}>}[Customer Name], ', ') 

If you want to create a chart dimension of Customers who purchased chairs:

Aggr(Only({<[Sub-Category]={'Chairs'}>}[Customer Name]) , [Customer Name])

-Rob

 

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you want a list of customers who purchased chairs:

Concat({<[Sub-Category]={'Chairs'}>}[Customer Name], ', ') 

If you want to create a chart dimension of Customers who purchased chairs:

Aggr(Only({<[Sub-Category]={'Chairs'}>}[Customer Name]) , [Customer Name])

-Rob

 

Mayank_Mohan
Partner - Contributor II
Partner - Contributor II
Author

Thanks for the solution , if again i want to filter this according to a particular year 

Like the list of the customer who buy chairs in year 2015.

 

Can you please help me with this also.

Thanks

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add a second field modifier:

{<[Sub-Category]={'Chairs'}, Year={2015}>}

-Rob