Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different shades of blue based on rank

Hi Community,

I am trying to get different shares of a blue for my pie chart based on rank.

Colors should be a more darker version of the blue based on their rankings in terms of total cost: so #1 should have lighter version of blue and as the rank increases in terms of total cost, the color should incrememtally get darker.

can this be done in more efficient way other than me typing each rank and color as a seperate line ? if you guys have any ideas it would be highly appreciated. Thanks,

here is what i am planning on using (also attaching a qvw for the example)

if(rank(sum(GrandTotalCost))=1, rgb(0,159,195),Blue())

Would be helpful if you guys have an idea to get this done in an efficient manner. Thanks,

3 Replies
swuehl
MVP
MVP

You can use the Colormix() functions or ARGB() with some calculations to map your ranking to colors, something like

ColorMix1(

(Count(TOTAL Distinct Country)-Rank(-Sum(GrandTotalCost)))/Count(TOTAL DISTINCT Country)

, White() , Blue())

[agreed, white() is an extreme color, used just for demonstration]

MarcoWedel

Hi,

already having sorted by sum(GrandTotalCost) there's no need for ranking anymore:

QlikCommunity_Thread_209770_Pic1.JPG

QlikCommunity_Thread_209770_Pic3.JPG

RGB((1-(RowNo()-1)/(NoOfRows()-1))*200, (1-(RowNo()-1)/(NoOfRows()-1))*200, 255)

or similar to Stefan using colormix:

QlikCommunity_Thread_209770_Pic2.JPG

ColorMix1((RowNo()-1)/(NoOfRows()-1),RGB(200,200,255),Blue())

hope this helps

regards

Marco

MarcoWedel

... and to feed the popular discussion about the pie chart's pros and cons (Gysbert, are you around?) some "historical background": ye-olde-pie-chart-debate

enjoy

Marco