Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
SonPhan
Partner
Partner

Set Analysis: Weird Dimension Bug

Hello Guys,

i have a problem regarding set analysis.

I prepare a simple demo app.

I came across an error, which I do not understand, I think in my eyes I have built everything logically correct.

The third chart should be a pie chart, if the dimension Vendor is selected as a filter, it should take the upper right chart, otherwise the upper left chart.

SonPhan_2-1613123739381.png

Hope you guys can help me with my problem!

 

Thanks a lot .

 

Son

 

 

Labels (3)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

@SonPhan 

To get the functionality that you have described in your 3rd chart, use the following expressions:

Dimension:

=aggr({1} if(Only({1<Vendor=P(Vendor)>}Vendor)=Vendor,Vendor,'Other'),Vendor)

 Measure:

sum({$<Vendor=>} Sales)

If you select one Vendor, it will present that vendor and group the rest into 'Others'.

Note: If you select 2 Vendors, it will present those 2 vendors and group the rest into 'Others'.  I think that gives you more functionality.

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

@SonPhan 

To get the functionality that you have described in your 3rd chart, use the following expressions:

Dimension:

=aggr({1} if(Only({1<Vendor=P(Vendor)>}Vendor)=Vendor,Vendor,'Other'),Vendor)

 Measure:

sum({$<Vendor=>} Sales)

If you select one Vendor, it will present that vendor and group the rest into 'Others'.

Note: If you select 2 Vendors, it will present those 2 vendors and group the rest into 'Others'.  I think that gives you more functionality.

View solution in original post

SonPhan
Partner
Partner
Author

@GaryGiles

 

Thank you ! This is much better as expected!