0 Replies Latest reply: Jun 6, 2017 3:32 AM by Phalgun Parvathaneni RSS

    Custom Color Code for Stacked Bar Chart

    Phalgun Parvathaneni


      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!