Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Partner
Partner

Bar Chart color based on rank

Hi community,

I'm creating a bar chart where i want to show the top sellers.

I have this expression: Sum({$<DateType={'Prod'}>}Sales) and this give me the values i want.

Then i sorted from best seller in top (vertical bar chart) to worst seller in top. But i only show the top 10 records. This top 10 change along with the selections of user.

What i want to do with the color is use a gradient value from dark to light, where dark represents the top seller and the ligth represent the last place from this 10.

I cant find any expression in order to ignore all values and only use the gradient colors on the top 10.

At the moment i use this expression on background color of expression.

(Count(TOTAL Distinct Store)-Rank(-Sum({$<DateType={'Prod'}>}Sales)))/Count(TOTAL DISTINCT Store)

, White() , Blue())

Anyone can help me?

Thanks in advance.
Best Regards

Bruno Paulo

3 Replies

Re: Bar Chart color based on rank

Hi,

Check if this works for you.

Using ColorMix In Qlikview

Regards,

Kaushik Solanki

vardhancse
Valued Contributor III

Re: Bar Chart color based on rank

Hi Try,

=If(Aggr(Rank(Sum(Sales),4),<Dim>)<=10,<Dim>)

4 indicates

Value

Description

0 (default)

If all ranks within the sharing group fall on the low side of the middle value of the entire ranking, all rows get the lowest rank within the sharing group.

If all ranks within the sharing group fall on the high side of the middle value of the entire ranking, all rows get the highest rank within the sharing group.

If ranks within the sharing group span over the middle value of the entire ranking, all rows get the value corresponding to the average of the top and bottom ranking in the entire column segment.

1

Lowest rank on all rows.

2

Average rank on all rows.

3

Highest rank on all rows.

4

Lowest rank on first row, then incremented by one for each row.

Partner
Partner

Re: Bar Chart color based on rank

Yes I tried to use colormix but when the values ​​were very disparate (for example the 1st and 2nd place very highlighted, the gradient was too intense) and I didn't like the tonality of the colors. I was looking for something more subtle but perceptible