Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Last Week Sales with Date Hierachy

Hi all!


I am looking for some assistance with the Dateadd Dax. I have two data points I am trying to show by date, current week sales and last week's sales. Creating a dax for last week's sales is not an issue by using calculate(sales,dateadd(date,-7,day)). When doing so I get the correct value, however, when adding it to a matrix that has a date hierarchy, last week's sales only provide a total, whereas I would like to see each daily amount. If I do not use the date hierachy and use date instead, the day by day total shows for last week with the correct amounts. Below is what is returned.


Undesired display using a date hierarchy. However, last week total is correct.


Without date hierarchy. Day-by-day total shows as desired. 


How can I achieve the same result by using the date hierarchy?




Community Support
Community Support

Hi @jawilson808 , 

I cannot reproduce your issue.


It may some errors on your DAX. If you are using selectedvalue, please modify the formula.


Could you please provide your pbix file without privacy information and the dax formula?


Best Regards

Community Support Team _ Polly


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



Super User
Super User

Hi @jawilson808 


Chek this link, it might be useful:



If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!



Helpful resources

August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors