1 Reply Latest reply on Jul 15, 2016 11:33 AM by Patrick Van Der Hyde

# Trying to calculate LFL sales for current week vs last week

Hi All,

I am trying to calculate Like for Like (LFL) for Current Week vs Last Week. The calculation is :

LFL = CurWeekSales- SameWeekLastYearSales/ SameeWeekLastYearSales

But the thing is, I just need SameWeekLastYearSales only if CurWeekSales for that particular shop is present else it shouldn't calculate.

EXAMPLE: There are 3 stores A, B and C.

Store    CurrentWeekNet   SameWeekLastYearNet

A                    50                          40

B                                                  60

C                    10

-------                     ------

60                         40

So I want the calculation to be ((60/40)-40)*100)

The store B SameWeekLastYear shouldn't be taken into account because CurrentWeekNet for storeB wasn't present. Could any one help me with this?

I have dimensions such as Current Full Week and Same Full Week Last year present.

Thanks,

Shivang

• ###### 1. Re: Trying to calculate LFL sales for current week vs last week

Hello Shivang Desai,

This calculation can be done with a replacement based on a condition.  So create a new version of [SameWeekLastyear] based on the condition of Currrent week being Null.  Make sure the calculation is happening per row  so there should be no aggregation in the calc.

If isnull([Current Week Net]) then Null else [Same Week Last Year Net] END

Then you can do your calculation.

(sum([Current Week Net])/sum([fixed same week last year])-sum([fixed same week last year]))*100

Atttached is a workbook example.

I hope this helps

Patrick