2 Replies Latest reply: Oct 6, 2017 2:50 AM by Phalgun P RSS

    Custom Color Code for Stacked Bar Chart

    Phalgun P


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


      Dimension: ValueList('Type')


      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'),


      [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!