Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
martynlloyd
Partner - Creator III
Partner - Creator III

Set analysis field in place of variable

In my script I have a table:

Charts:

LOAD * Inline [

_Chart, _ChartKPI

C01 Penetration, S8

C02 QC, V1

C03 Variance, V11

C04 Performance, V7

C08 Submission, V4

C09 Referral, V9

C10 Refusal, V5

];

List type is set to select only 1 value

In the chart I have expression:

if(GetSelectedCount(KPIMonth)>0, sum({$<KPIID={V1}>} ResultValue), sum({$ <KPIID={V1}, KPIMonth={Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec}>} ResultValue))

I want to replace the constant V1 with field _ChartKPI.

I have looked at several posts, tried $ expansion, but can't find a solution.

Regards,

Marty.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

sum({$<KPIID={'$(=only(_ChartKPI))'}>} ResultValue) should work as long as your Charts table is a data island and only one value of _Chart or _ChartKPI is selected .


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

sum({$<KPIID={'$(=only(_ChartKPI))'}>} ResultValue) should work as long as your Charts table is a data island and only one value of _Chart or _ChartKPI is selected .


talk is cheap, supply exceeds demand
martynlloyd
Partner - Creator III
Partner - Creator III
Author

That's what I thought, but I get No data to display.

If I put  ='$(=only(_ChartKPI))' in a text boxt, I get the correct value, if I use a constant, it works.

It's driving me nuts, I need a better strategy for debuging this problem.

Gysbert_Wassenaar

Can you post the offending document or an example that demonstrates the problem?


talk is cheap, supply exceeds demand
martynlloyd
Partner - Creator III
Partner - Creator III
Author

strange thing - I created a new chart from scratch and it works.