locked
PowerPivot get same percentage for the previous year RRS feed

  • Question

  • Hi,

    I am trying to find the same percentage on the same date in the previous month. I do not need to aggregate the data.

    E.g :  Lets assume that the percentage on Sep-30-2016 was 5% for 'product X'  in the current month, I would like to find the percentage on Aug-31-2016 for 'product X'. Please note that I do not need the percentage for Aug-30-2016.

    Thanks for your time and help in advance!

    Regards

    Monday, October 3, 2016 10:08 PM

Answers

  • Hi BISQL,

    Based on your description, you need to get the same day for previous month, and the calculated the percentage on that month, right?

    In your description, you said that
    Lets assume that the percentage on Sep-30-2016 was 5% for 'product X'  in the current month, I would like to find the percentage on Aug-31-2016 for 'product X'. Please note that I do not need the percentage for Aug-30-2016.
    For this logic, it will returns Aug-2-2016 for Sep-1-2016, right?

    You can get the same day for previous month by using the DAX=DATE(YEAR(FactSales[Date]),MONTH(FactSales[Date])-1,DAY(FactSales[Date]))

    Regards,


    Charlie Liao
    TechNet Community Support

    • Proposed as answer by Michael Amadi Tuesday, October 4, 2016 8:39 PM
    • Marked as answer by Charlie Liao Wednesday, October 19, 2016 5:37 AM
    Tuesday, October 4, 2016 3:42 AM

All replies

  • Hi BISQL,

    Based on your description, you need to get the same day for previous month, and the calculated the percentage on that month, right?

    In your description, you said that
    Lets assume that the percentage on Sep-30-2016 was 5% for 'product X'  in the current month, I would like to find the percentage on Aug-31-2016 for 'product X'. Please note that I do not need the percentage for Aug-30-2016.
    For this logic, it will returns Aug-2-2016 for Sep-1-2016, right?

    You can get the same day for previous month by using the DAX=DATE(YEAR(FactSales[Date]),MONTH(FactSales[Date])-1,DAY(FactSales[Date]))

    Regards,


    Charlie Liao
    TechNet Community Support

    • Proposed as answer by Michael Amadi Tuesday, October 4, 2016 8:39 PM
    • Marked as answer by Charlie Liao Wednesday, October 19, 2016 5:37 AM
    Tuesday, October 4, 2016 3:42 AM
  • Hi Charlie,

    Perfect! The DAX expression works great!

    Thanks a ton!

    Cheers!

    Tuesday, October 4, 2016 8:11 PM
  • Hi Charlie,

    Perfect! The DAX expression works great!

    Thanks a ton!

    Cheers!

    Hi BISQL,

    Please mark the corresponding reply, it will help others who have the similar issue to find the solution easily.

    Regards,


    Charlie Liao
    TechNet Community Support

    Monday, October 17, 2016 8:33 AM