Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to compare the sales made this year with the sales made last year but with the same day of the week.
Example: compare sales done on 01Feb2017 Wednesday with sales done on 03Feb2016 Wednesday.
Here's my load script:
mySales:
LOAD * INLINE [ Country, SaleYear, SaleMonth, SaleDay, SaleDayOfWeek, SalesNb
FR, 2016, Feb, 01, Mon, 12
FR, 2016, Feb, 02, Tue, 15
FR, 2016, Feb, 03, Wed, 13
FR, 2016, Feb, 04, Thu, 15
FR, 2016, Feb, 05, Fri, 10
FR, 2016, Feb, 06, Sat, 0
FR, 2016, Feb, 07, Sun, 0
FR, 2017, Jan, 30, Mon, 10
FR, 2017, Jan, 31, Tue, 12
FR, 2017, Feb, 01, Wed, 14
FR, 2017, Feb, 02, Thu, 17
FR, 2017, Feb, 03, Fri, 12
FR, 2017, Feb, 04, Sat, 0
FR, 2017, Feb, 05, Sun, 0
ES, 2016, Feb, 01, Mon, 8
ES, 2016, Feb, 02, Tue, 5
ES, 2016, Feb, 03, Wed, 3
ES, 2016, Feb, 04, Thu, 5
ES, 2016, Feb, 05, Fri, 2
ES, 2016, Feb, 06, Sat, 0
ES, 2016, Feb, 07, Sun, 0
ES, 2017, Jan, 30, Mon, 7
ES, 2017, Jan, 31, Tue, 9
ES, 2017, Feb, 01, Wed, 7
ES, 2017, Feb, 02, Thu, 10
ES, 2017, Feb, 03, Fri, 11
ES, 2017, Feb, 04, Sat, 0
ES, 2017, Feb, 05, Sun, 0
];
Here's my bar chart with :
- Dimension: country
- Measure : Sum({<SaleYear = {'2017'} >}SalesNb)
I would now like to add another measure with the sum of sales but for the sales made same dates minus 364 days (in order to compare Monday with Monday, Tuesday with Tuesday, etc...).
Thanks a lot!
Annick
Number of ways you could do this comparison.
You could create another measure for 2016 like you did for 2017 and add sale day of the week as a dimension
Or you can add a filter box with country and day of the week and just have the dimension as a year so you haven't got to hard code it.
Or perhaps a line chart with days of week as the dimension and year with a country filter to show the comparison over the course of the week.
Hope this helps
Andy
Some examples attached