I am working with weekly data in a financial year from July-June, which i have numbered the weeks from the beginning of the data (named WeekSinceStart in equations)and also got weeks 1-52/53 for the individual years.
I would like to show the following:
Current week sales (ie 1st jan 2014(numbered week 1))
The Last 4 weeks sales (from the current week ie 1st jan 2014)
The last 12 weeks sales (from the current week ie 1st jan 2014)
The last 52 weeks sales (from the current week ie 1st jan 2014)
As well as comparing growth from:
The previous year same week(ie 1st Jan 2013 compared to 1st Jan 2014(numbered week 1)
Last 4 weeks, and the preious year 4 weeks (same period)
Previous year 12 weeks (same period)
I have come up with 2 equations, the first- which should compare the same week 52 weeks ago, or 1 week, 4 weeks or 12 weeks depending if I cahnge the -52 at the end:
Sales same week 52 weeks ago (With my table names in):
Sales same week 52 weeks ago:=CALCULATE([UnitSales], Dates[WeekSinceStart]=values(Dates[WeekSinceStart])-52)
However I get the following error:
“A table of multiple values was supplied where a single value was expected”
The second equation, which should sum the last 52 weeks, or 12,4 or 1 week depending if I change the -52::
Sales same last 52 weeks sales:=CALCULATE([UnitSales], Dates[WeekSinceStart] >= values(Dates[WeekSinceStart]-52)
&& Dates[WeekSinceStart] <= values(Dates[WeekSinceStart]))
However I get the following error:
“Semantic Error:The Values function expects a column reference for argument ’1′, but a string or numeric expression was used”
To add confusion to this issue, my financial years are July-June
I look forward to your resposne, and any assistance you can give
I would like to show the following:
Current week sales (ie 1st jan 2014(numbered week 1))
The Last 4 weeks sales (from the current week ie 1st jan 2014)
The last 12 weeks sales (from the current week ie 1st jan 2014)
The last 52 weeks sales (from the current week ie 1st jan 2014)
As well as comparing growth from:
The previous year same week(ie 1st Jan 2013 compared to 1st Jan 2014(numbered week 1)
Last 4 weeks, and the preious year 4 weeks (same period)
Previous year 12 weeks (same period)
I have come up with 2 equations, the first- which should compare the same week 52 weeks ago, or 1 week, 4 weeks or 12 weeks depending if I cahnge the -52 at the end:
Sales same week 52 weeks ago (With my table names in):
Sales same week 52 weeks ago:=CALCULATE([UnitSales], Dates[WeekSinceStart]=values(Dates[WeekSinceStart])-52)
However I get the following error:
“A table of multiple values was supplied where a single value was expected”
The second equation, which should sum the last 52 weeks, or 12,4 or 1 week depending if I change the -52::
Sales same last 52 weeks sales:=CALCULATE([UnitSales], Dates[WeekSinceStart] >= values(Dates[WeekSinceStart]-52)
&& Dates[WeekSinceStart] <= values(Dates[WeekSinceStart]))
However I get the following error:
“Semantic Error:The Values function expects a column reference for argument ’1′, but a string or numeric expression was used”
To add confusion to this issue, my financial years are July-June
I look forward to your resposne, and any assistance you can give