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: 
SureshUK
Contributor II
Contributor II

Data island and variable

Hi,

I am trying to use data island to get specific text based on the value calculated in a variable.

The data island model is:

Score, Rating

1, Higher

2, Medium

3, Low

4, Moderate

11,Higher

12, Higher

...

..

444 Moderate

and goes up to the value 444..

I have a variable vRatingCalc which calculates the score in the score for each of the region. I would like to print the rating for the score calculated in the pivot chart.

I tried using the following and it didn't work

if ($(vRatingCalc)=Score, Rating)

I tried using set analysis but still doesn't work

maxstring({<Score="$(vRatingCalc)">}Rating)

I am not sure what I am missing here. Can you please suggest a solution?

13 Replies
vishsaggi
Champion III
Champion III

Try this in your Final Rating

= Aggr(IF(Match(Score, $(vVal)), Rating), Score, Code)

SureshUK
Contributor II
Contributor II
Author

Thanks Vishwarath. This works when I use a simple variable. My variable has aggregation function so it fails for me. Do you know how to make it work by referencing a another column value on the same chart? When I tried

=Aggr(IF (Match(Score,Test)),Rating), Score, Code) it fails. Test has an expression "= $(vVal)"

vishsaggi
Champion III
Champion III

Is Test your variable? You may want to use $(Test) ?

SureshUK
Contributor II
Contributor II
Author

Test is an expression name in the chart.