# Same Period Last Week



## ahmedismailfourtex (May 16, 2016)

Hello,
I have Sales Data ( Product , Date , Quantity , Week )
How to get sales data for last week so we can compare week with last week and watching change over weeks ?
Thanks


----------



## Oeldere (May 16, 2016)

make a pivot table to analyze the data.


----------



## bigck2 (May 16, 2016)

Could you build a DAX measure using DatesAdd function with the arguments set to: DateTable[Dates] , -1, Weeks . Like this:


```
Sales_Last_Week = Calculate(   
                   Sum( Table[Sales] ) , 
                DatesAdd( DateTable[Dates] , -1, Week ) 
)
```


----------



## akice (May 16, 2016)

Week based time intelligence:  https://www.sqlbi.com/articles/week-based-time-intelligence-in-dax/


----------

