Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

mrthomasshelby
Contributor

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

2 Replies
tauceef9
Contributor

Re: Custom Color Code for Stacked Bar Chart

Hi Phalgun,

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

Regards,

Tauceef

mrthomasshelby
Contributor

Re: Custom Color Code for Stacked Bar Chart

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

Community Browser