Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
anatle1234
Contributor III
Contributor III

show Only specific colors stations

hi,

I have a requirement to add some feature to  the qlikview as the following:

I have an expresion for backgound color and itd colors the stations by my expresion:

Capture.JPG

now I want to add some legend at the side and create a Filter for coloring, I mean when I click on Red I will see stations only in Red on the map...like in the picture (in picture I have only red but it can be yellow and purple also).

is this possible?

3 Replies
justinvchiang
Contributor III
Contributor III

Hi Anat,

If the colors correspond to a particular measureable range you could do something like the attached.

It is an inline table that matches to the background color expression:

ColorLegend:
LOAD * INLINE [
%color, rgb, low, high
red, 'rgb(255,0,0)', 0, 100
green, 'rgb(0,255,0)', 101, 400
blue, 'rgb(0,0,255)', 400, 1500
]
;

then within the chart there is a new expression that only shows values where the range matches the color selected.

if(aggr(sum(fact), station) >= only(low) and aggr(sum(fact), station) <= only(high), sum(fact))

anatle1234
Contributor III
Contributor III
Author

Hi,

thanks for the answer. since I am very new to QV i didn't get this expression:

if(aggr(sum(fact), station) >= only(low) and aggr(sum(fact), station) <= only(high), sum(fact))

can you please explain to me this.

devarasu07
Master II
Master II

Hi,

It's like combination of your sql group by clause and excel if with between condition

part 1: if condtion

i.e here report amount should display if Fact amount should be greater than equal and lesser than or equal of your dimension field(Low & high)

if(aggr(sum(fact), station) >= only(low) and aggr(sum(fact), station) <= only(high), sum(fact))

part2, sql group by class

aggr(sum(fact), station)

fact amount group by Station dimension

for more details check this article about aggr function in qlik,

https://www.analyticsvidhya.com/blog/2014/02/aggr/

Aggr() function

Thanks,

Deva