Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Previous Year Measure completely wrong

Hi All - I am pulling my hair out with overcoming this basic requirement that other BI tools have handled so well.   The requirement is that users can interact with an embedded date slicer and cont...
  • Phil_Seamark's avatar
    Phil_Seamark
    8 years ago

    Figured it out!

     

    Took me a while to download the 800MB model over my phone :o

     

    The correct DAX formula should be

     

    Booked Sales YAGO = CALCULATE(SUM(vw_fact_booking[net_total_amt]),SAMEPERIODLASTYEAR(dates[date]))

     

    The PREVIOUSYEAR calc was taking the whole previous year into account even if you were only selecting a month from the current year.  Useful for somethings, but not for you.

  • Anonymous's avatar
    Anonymous
    8 years ago

    Thank you Phil_Seamark

    Something so simple turning my hairs grey.

    Appreciate your help mate,

    Jake