Forum Discussion

asl10's avatar
asl10
Icon for Helper I rankHelper I
9 years ago

Compare Feature Sales with Previous Year Feature Sales

Hi,

I would like to compare sales of reserved bookings (Hotel) for 2017 with reserved booking sales for the same period last year?

 

E.g. Based on Input Date of users 2016 i can see the figures for 2017. But based on input date of 2015 based on current date now i cannot see what was the result, in one graph side-by-side! I only managed to do it with two graphs and using 2 types of Year filters on each graph for 2016 and 2015. (Reserved Date and Input Date).

 

Can i make a DAX formula or something in order to have the 2 values side-by-side in one graph?

 

19 Replies

  • austinsense's avatar
    austinsense
    Icon for Impactful Individual rankImpactful Individual

    A little trouble understanding what you're trying to do - here's the basics of calculating This Year vs. Last Year

     

    Bookings (ThisYear) = SUM(Table[Bookings])
    Bookings (LastYear) = CALCULATE( [Bookings (ThisYear)], DATEADD(Calendar[Date], -12, MONTH))

    Let me know if this helps.

    • asl10's avatar
      asl10
      Icon for Helper I rankHelper I

      Let me explain the business case:

       

      For example asOf today, 23/12/16 (Input Date) I have xxxxx Total Revenue for 2017 based on Reservation Date.

       

      For Last Year, asOf  23/12/15 (Input Date) what I had in Total Revenue for 2016 based on Reservation Date?

      • Baskar's avatar
        Baskar
        Icon for Resident Rockstar rankResident Rockstar

        1. Bookings (ThisYear) = SUM(Table[Bookings])

        2. Bookings (LastYear) = Calculate ( SUM(Table[Bookings]), SAMEPERIODLASTYEAR(Calendar[Date]))

         

        let me know if it is not helping u