Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
madhun
Contributor II
Contributor II

Qlik Sense

I have A Bar Chart Which Is Sales By Country,
I Need To Change the Color Of  Top 10 Bars Below 100k As red(),Remain Bars Are As it Is 
But I Want  all bars Are Present In the chart ,
But Only Top 10 Bars Less Than 100k Values will Change Dynamically Only

Labels (2)
2 Solutions

Accepted Solutions
Prem0212
Creator
Creator

You can use either of the below two expressions,

If(Aggr(Rank(sum(Sales))<=10, City), red())

If(Rank(sum(Sales))<=10, red()).

 

Please like and accept the solution if u liked it

View solution in original post

madhun
Contributor II
Contributor II
Author

I Got The Output

madhun_0-1683194396075.png

This Is The Logic :: 

If(Aggr(Rank(sum(Sales))<=10, Country) and Aggr(Sum(Sales),Country)<=100000, red(),


If(Aggr(Rank(sum(Sales))<=10,Country),Green(),Blue()))

View solution in original post

4 Replies
Chanty4u
MVP
MVP

Hi,

try something like below

 

  1. Set the limit to "10" and choose your measure (sales).=if(Sum(Sales) < 100000, Sum(Sales))        //(This expression will limit the dimension to the top 10 bars with sales below 100k.)

then 

  1. Under "Custom Color," select the "Color By Expression" option.

 

=if(Rank(Sum(Sales)) <= 10 and Sum(Sales) < 100000, 'red()', 'default')

 

Prem0212
Creator
Creator

You can use either of the below two expressions,

If(Aggr(Rank(sum(Sales))<=10, City), red())

If(Rank(sum(Sales))<=10, red()).

 

Please like and accept the solution if u liked it

Prem0212
Creator
Creator

you can use this     If(Rank(sum(Sales))<=10, red(), RGB(0, 112, 192))

and instead of RGB u can use any color for the default one too

madhun
Contributor II
Contributor II
Author

I Got The Output

madhun_0-1683194396075.png

This Is The Logic :: 

If(Aggr(Rank(sum(Sales))<=10, Country) and Aggr(Sum(Sales),Country)<=100000, red(),


If(Aggr(Rank(sum(Sales))<=10,Country),Green(),Blue()))