9 Replies Latest reply: Feb 24, 2017 2:47 AM by Mike Slottje RSS

    Current month previous year expression

    Mike Slottje

      Hi guys,

       

      I want to compare the sales of the current month in the current year with the sales in the current month in the previous year.

      I tried the following expressions:

      sum({< Year={"$(=max({<year>}Year)-1)"}, Date ={">=$(=MonthStart(Today())) <=$(=MonthEnd(Today()))"} >}[Nett Amount new EUR])

       

      sum({< Year={"$(=max({<year>}Year)-1)"}, Date ={">=$(=MonthStart(Today()-12)) <=$(=MonthEnd(Today()-12))"} >}[Nett Amount new EUR])

       

      The Year (current year) and Date (current month) are working seperately, but not when combined.

      It would be great if you guys could help me out!

       

      Cheers:)

       

      Mike