1 Reply Latest reply on Dec 2, 2019 8:11 PM by shuhei saito

    Coloured Current Month on Stacked Bar Not Working with Secondary Datasource

    Vanessa Gray

      Hello helpful people!


      Attached workbook


      I have a running sum over sales for a selected year.  I want to highlight the values as they occur in the "current month"  I have created a parameter to select the current month to make sure its working ...

      Worksheet titled "Working" shows the sales in December on top of the YTD to Nov - and it looks great. 

      But when I add the targets, see worksheet titled "Not Working" it only colours the WHOLE month incl. the YTD figures for sales.    see second image below

      The targets have to be the primary datasource because the targets are set at the start of the year and I want the chart to show all months and they fill up as the year progresses. 

      Sales only occur in the sales table as the operational data comes in.


      Can I colour the portion of the bar for a running sum within a secondary datasource


      Workings attached


      Help muchly appreciated

        • 1. Re: Coloured Current Month on Stacked Bar Not Working with Secondary Datasource
          shuhei saito

          Hi Vanessa,


          When you use Data Blending and row-level (non-aggregated) calculation from secondary data source, you need to add the granularity which identify each row in the view.

          But in your case, it is not possible to add Order Date because primary data source does not have it.


          So if you want to separate colors by today's month or not, I recommend you to separate aggregation and use Measure Names & Measure Values.


          1. Create 2 calculated fields on secondary data source.


          2. Add both field into the view with Measure Values, and set Running Total on both fields.


          3. Add Measure Names to Color on Measure Values' axis.


          (4. Change color allocation and title of color legend as you like.)




          Please see attached workbook.