2 Replies Latest reply on Sep 26, 2016 12:33 PM by Vincent Baumel

    MY as a datepart?

    Vincent Baumel



      I'm trying to dual axis a bar chart, where the background bar stays the same (as a sum of sales) but the foreground bar shows the sales of a particular region that a user selects. The bars are arranged by MY(Invoice Date) in the columns shelf, and the problem I'm running into is what to set the background measure to. I tried the following:


      {FIXED DATEPART('month', [Invoice Date]) : SUM([Net Sales]) }


      but it wants to restart my values every year. Each June is the same, each July is the same, each August is the same, etc. The background bar value is the sum of each month - for example, rather than show sales for June of 2014 it's showing sales for June of 2014+2015+2016+2017. I assume this is because the rows shelf is telling it to show SUM(BackgroundBar), but I may be wrong:



      Any idea how to achieve what I'm going for?



      The inspiration for this attempt came from Corey Jones, on the Data Hawk blog. Really neat idea, it's just proving a challenge for M-Y dates as opposed to Categories or SubCategories.