Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Partner
Partner

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Set analysis field in place of variable

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Set analysis field in place of variable

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

Highlighted
Partner
Partner

Re: Set analysis field in place of variable

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.

Highlighted
MVP & Luminary
MVP & Luminary

Re: Set analysis field in place of variable

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


talk is cheap, supply exceeds demand
Highlighted
Partner
Partner

Re: Set analysis field in place of variable

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