Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Contributor III
Contributor III

Re: show Only specific colors stations

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))

Highlighted
Contributor III
Contributor III

Re: show Only specific colors stations

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.

Highlighted
Master II
Master II

Re: show Only specific colors stations

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