11 Replies Latest reply on Aug 23, 2017 5:09 PM by Braydon Davis

    Grab Total Sales for Current Year & Growth %

    Braydon Davis

      Hoping to receive some help to solve this challenge

       

      Dimension: Month_Year (Format: DATE ,Value Example: 2017-05-01, 2017-06-01, etc.)

      Measure: Sales

       

      Objective 1: Grab total sales for current year. Example: sum all months to give me the total sales for the current year.

       

      Calc1: Window_Max(Year(Month_Year) THEN TOTAL(Sales) = Current Year Sales

       

      Objective 2: Grab total sales for current year and previous year. Calculate year over year growth.

       

      Calc 2: Window_Max(Year(Month_Year)-1 THEN TOTAL(Sales) = Previous Year Sales

       

      Calc 3: Calc1-Calc2/Calc2 = Growth %

       

      Output example:

       

      2017 Current Year Sales: $300,000

      Year over Year Growth %: 20%

       

      I've tried window_max and various other functions but could not get to work. Any help is appreciated.