Forum Discussion
Previous Year Measure completely wrong
- 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.
- Anonymous8 years ago
Hi Anonymous
Do you mean about multiple relationships?
Phil_Seamark, nope, I tried your suggestion with the date table and the problem still remains
- Phil_Seamark8 years agoMicrosoft Employee
Hi Anonymous
Something odd is happening.
Are you able to provide me with a stripped down version of your PBIX file?
Save a copy and remove all tables other than your sales table and the date table. Remove all columns from your sales table and upload to this post (if that is ok). That might make it easier for me to spot what is going on.
- Phil_Seamark8 years agoMicrosoft Employee
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.
- Anonymous8 years agoNot applicable