Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
kulasekhar
Creator
Creator

How to display two colors in barchart

Hi All,

I want display batem 25% in Purple color remaining Blue color.


please send me sample qvw.


Thanks

sekhar.

23 Replies
sunny_talwar

Hey Michael‌, I think threads can never be closed for good solutions . Unfortunately, I am working off of a Personal Edition of QlikView, would it be possible be to share how you went about doing it????

Thanks,

Sunny

Anonymous
Not applicable

Let me try, sunindia‌,

First, I used (as I often do) the test script generated by Ctrl+Q+Q.

Next, created a variable v25 that calculates 25% of the amount, which is in my case "Expression1":

=sum(Expression1)/4

For testing, created a straight table with expressions:

range1:  rangesum(above(sum(Expression1),0,RowNo()))

range2:   rangesum(above(sum(Expression1),1,RowNo()))

1:   if(range1<v25 and range2<v25,
sum(Expression1),
if(range1>v25 and range2<v25,
v25-sum(Expression1)
,0
))

2:   if(range1<v25 and range2<v25,
0,
if(range1>v25 and range2<v25,
sum(Expression1)*2-v25
,sum(Expression1)
))

Converted to a bar chart.  First wanted to keep range1 and range2 expressions just making them invisible, but they distorted the scale.  So, had to remove them and replace reference to them in the 1 and 2 with the actual expressions.

That's it pretty much.  I'm sure that all this can be cleaned up and improved if needed.

Regards,

Michael

kulasekhar
Creator
Creator
Author

HI Michael.



1)The first 25% Purple color the remaining Blue color.(In bar chart)


2)Top 10  Reps By Quota Achievement (Sorted By Quota Achievement).(in staright table)


3)Bottom 10  Reps By Quota Achievement (Sorted By FY‘15 Quota).(in staright table)


please help me.




Thanks

Sekhar.

MarcoWedel

Please close this thread if your initial question is answered and open another thread for independent questions.

Thanks

Regards

Marco