Forum Discussion
Kr1s
6 years agoFrequent Visitor
SAMEPERIODLASTYEAR with filters
Hi, I have a dataset consisting of all sales from 2016 to present day. There are multiple entries per date broken down by payer, customer, product group and product. Whenever I use SAMEPERIOD...
amitchandak
Super User
6 years agoSAMEPERIODLASTYEAR and all time intelligence function work better with a date calendar, Hope you are using one.
You can also use a year behind measure like
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/