12 Replies Latest reply: May 29, 2015 12:54 PM by Rob Wunderlich RSS

    Bar graph coloring not applying appropriatly based on expression

    Matt Mohon

      I've got a stacked bar chart that I want to display, by quarter, sales for the past 2 years.

      The issue I have is, coloring applies correctly to only the Year & Quarter I have currently filtered on.

      How do I edit my coloring expression to fix that? Is it a set analysis issue?


      variables set,

      cy = max(year)

      pv = max(year)-1




      =1 ---- >I have to add this obligatory dimension to make it a stacked bar, rather than a side by side bar




      sum ({$ <year+={$(cy),$(pv)}, qtr+={*}>}  sales) / sum ({$ <year+={$(cy),$(pv)}, qtr+={*}>}  TOTAL <year,qtr>  dkey)


      Bar chart Color Expression:

      pick( match(category,'1','2','3','4'),