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

Set analysis in Straight Table

Hi,

I am trying to pull a value into a straight table based on certain criteria.  In the expression tab, I have the following statement:

=

Sum({<Metric_Num = {"=MetricFlag = Metric_Num"}> * <Start_Size = {"=$(Size) >= [Start_Size]"}>*<End_Size = {"=$(Size) <= [End_Size]"}>}[Percentile - 25th])

The values are coming from three separate tables.

Table A:

Profit Center #

Size_Num

Month

Year

Table B:

MetricID

MetricName

Table C:

Metric_Num

Start_Size

End_Size

Percentile-25th

I am using some variables in the set analysis:

MetricFlag: = MetricID that the user selected

Size: Avg(SizeNum)

The above statement is supposed to pull the value from the Percentile-25th column (in table C) where:

Metric_Num = MetricID

AND

Size >= Start_Size

And

Size <= End_Size

When I select one profit center only, I get the correct result.  When I don't have a specific profit center selected, all of the lines in the straight table show the same value in this field.  How do I get the straight table to look at the profit centers separately when computing this field?

Thank You!

0 Replies