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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
mrthomasshelby
Creator III
Creator III

Custom Color Code for Stacked Bar Chart

Hello,

I have a stacked bar chart with one dimension and two measures which are as follows:

Dimension: ValueList('Type')

Measure1:

Pick(Match(ValueList('C'), 'C'),

Sum({<[Vendor], [Type] = {'C'},

[Code] = {"=Count(DISTINCT {<[Vendor] = {""=Sum({<[Vendor]>}Aggr(Rangesum(Above(Sum({<[Vendor]>} [Sales])/Sum({<[Vendor]>} TOTAL [Sales]), 0, RowNo())), ([Vendor],(=Sum({<[Vendor]>} [Tsa.NetValueinUSD]),Desc)))) >= 0.8""}, [Type] = {'NC'}, [Type1] = {'M'}>}[Code]) >= 1"},[Type1]>} [Sales))

Measure 2:

Pick(Match(ValueList('Top 80 N'), 'Top 80 N'),

Sum({<[Vendor],

[Code] = {"=Count(DISTINCT {<[Vendor] = {""=Sum({<[Vendor]>}Aggr(Rangesum(Above(Sum({<[Vendor]>} [Sales])/Sum({<[Vendor]>} TOTAL [Sales]), 0, RowNo())), ([Vendor],(=Sum({<[Vendor]>} [Sales]),Desc)))) > 0.8""}, [Type] = {'NC'}, [Type1] = {'M'}>}[Code]) >= 1"},

[Vendor] = {"=Sum({<[Vendor]>}Aggr(Rangesum(Above(Sum({<[Vendor]>} [Sales])/Sum({<[Vendor]>} TOTAL [Sales]), 0, RowNo())), ([Vendor],(=Sum({<[Vendor]>} [Sales]),Desc)))) <= 0.8"},

[Type] = {'NC'},[Type1]>} [Sales]))

Now, I'd like to create an expression for the color code. The first measure part of the bar chart should be colored rgb(255,236,21) and the Top 80 N part should be colored rgb(255,213,0). Please help me build this expression. TIA!

stalwar1

Labels (1)
2 Replies
tauceef9
Creator
Creator

Hi Phalgun,

Did you find any solution for this? we are also have similar requirement.

Regards,

Tauceef

mrthomasshelby
Creator III
Creator III
Author

Hi Tauceef. Sadly I couldn't find any solution to this and had to scrap the chart.