Forum Discussion

JosephOutlaw's avatar
JosephOutlaw
Frequent Visitor
9 years ago

Same Store Sales metric

Hi everyone,

 

I am looking to analyze Same Store Sales in Power BI, but am having trouble getting it to work correctly (or know IF it is working correctly).

 

I would like to have this metric calculated in a measure that also allows dynamic time period selections (e.g., year, quarter, month).  I have gotten as far as being able to evaluate current period performance vs the same period in the prior year using SAMEPERIODLASTYEAR in DAX, which does work dynamically with year/quarter/month slicers, however, I need to be able to calcuate the growth for only the sample set of customers that had sales in the period of the prior year.  Ultimately I would like to visually plot the growth rates by period.

 

Below are the measures I am using, based off of the stored [Sales] numbers/data.

 

 

1)  Measure to return Sales numbers from the same period in the prior year (SPPY):

[Sales SPPY] = CALCULATE([Sales],SAMEPERIODLASTYEAR([Date])

 

2)  Measure to calculate the growth only for the customers that had Sales in the same period in the prior year:

[Sales Same Store SPPY Growth %] = CALCULATE(If([Sales SPPY] > 0,[Sales] / [Sales SPPY] - 1,BLANK()))

 

Has anyone else calculate this measure before, possibly in a different manner?  I am evaluating against a large data set so I can't say for sure if the above calculating correctly.  Any help or suggestions on how to approach this metric would be much appreciated!

 

Thanks!

2 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi JosephOutlaw,

     

    I tested your formulas with my dataset, it worked fine. What could be the problems?

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale

     

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi JosephOutlaw,

     

    Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.

     

     

    Best Regards!
    Dale