Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Part of Selection as Modifer in Set Analysis

Hello,

I am building a dashboard to view sales in gallons. I have a chart that needs to represent the sales at a particular facility and the sales at all of the facilities that this facility supplies as separate lines. There is an identifier for each product that can be referenced. For example, the supply facility has a field "A" that contains the value 1. The satellite facilities have a field "B" that contains a 1. I want to aggregate the sales from these satellite facilities based on the selection I have made. I have attempted SUM(${<B = A>}Sales), SUM(${<B = {"A"}>}Sales), SUM(${<B = {A}>}Sales), SUM(${<B = {'A'}>}Sales), If(B = A, Sum(Sales)), and Sum(If(B = A, Sales)). So far all I get are either 0 values or identical values to the line for the Source Facility's dales.

Is there another method I could try?

Thank you,

Andrew

Message was edited by: Andrew Sechrist - I have attached a sample of my qvw with qvds

2 Replies
swuehl
MVP
MVP

There are of course other types of set modifier that might be possible, e.g. using implicite field value definitions (have a look at the p() function), but it's quite unclear to me how your data model and data looks like.

Since set analysis is all about field values and the relation between fields, it's essential to know how your possible sets look like.

Hence, please post a more detailed description of your data model and data, best by uploading a small sample QVW.

maksim_senin
Partner - Creator III
Partner - Creator III

Hi,

It's better if you provide a sample, since some of your expressions look well, but nobody can say why the do not work without a sample chart.

For instance, the following expression will work in a list object:

=Aggr(Only({<B=A>} B), B)

You should see in the list values of B which are equal to selected values of A, but for your case more details are needed.

Best regards,

Maxim