DAX for Same Store Sales

dkellogg

New Member
Joined
Jul 17, 2012
Messages
1
I'm perplexed by a problem involving a same store sales calculation. I have a table of POS (point of sales) data, the important dimensions being the [Store name], and [Date] There several other dimensions so that there are multiple records per store. We are measuring [Units].<o:p></o:p>
I need to calculate the growth of same store sales quarter over quarter. Because we have stores joining and leaving over multiple quarters I therefore need to check to see if that store had sales in the previous quarter.<o:p></o:p>
The plain English version of the DAX would be: "Sum the units of each store that reported sales last period"<o:p></o:p>
I keep cycling through various calculate, sumx, previousquarter combinations, but no joy. Can anybody shed some light on the order of operations?<o:p></o:p>
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hey man, I had the same problem with the calculation you mentioned, what I did something else instead, which I'm pretty sure I can't be the best way, but it worked. I created another table in powerpivot to use as a flag in order to identify the current month, quarter or year, and also identify the previous month, quarter or year. So in the end I had a "T 0" for this month and a "T-1" for last month. Then I used the Calculated function with the filter "T-1" and T 0", which resulted in something like this:

=CALCULATE(SUM(database[sales_value]), tbl_calendar[T-1 T 0]="T 0") / CALCULATE(SUM(database[sales_value]), tbl_calendar[T-1])

Did you get I mean? Hope it helps.

Cheers
 
Upvote 0
Hi guys, I saw this problem and couldn't resist digging in. I've got a solution to this that I will share on the blog tomorrow.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top