2 Replies Latest reply: Mar 3, 2016 8:24 AM by Maxime Dumas RSS

    Sense : Color expression not respecting set analysis

    Maxime Dumas

      I am trying to apply a color expression based on a value stored in my fact table on a bar chart. Since the fact table contains historical data, I applied a filter to get only current data.

       

      Dimension: FactTableName.SegmentName

      Measure: Sum({$<FactTableName.IsCurrent = {"true"}>}[FactTableName.TotalValue])

       

      Everything is working so far. If I filter on a single entity, I get a single bar for his latest segment name.

       

      But if I try to add a color expression like this:

      if([FactTableName.SegmentID]=1,rgb(0,51,102),if([FactTableName.SegmentID]=2,rgb(51,51,255),if([FactTableName.SegmentID]=3,rgb(0,153,153))))

       

      A second bar appears with a zero value (bar not visible but segment name appears on the axis) for the entity's previous segmentation.

       

      I get the same issue with treemaps, scatter plots, etc.

       

      Any idea on how to fix this? Color expression should not have an impact on data presentation other than setting the color...