How to compare the same days of a different year

Alberto Ceccato
Alberto Ceccato Active Partner
Level 100: Foundations of Building in Board First Comment
edited March 2023 in Platform

Hello, I need to create a cartesian chart in order to show how much my company has sold this year and how much last year.

The main problem is that we sell more on weekends, so if the first day of the year is satuarday, the year before it was friday, and it's obvious that this year performance is better than the last year's one. Can you please help me in finding the way to compare the days with their name, like this: the first monday of the actual year with the same of the previous one, and the same with the others days of the week.

Thanks in advance,

Alberto

Accepted Answers

  • Tommaso Riva
    Tommaso Riva Employee
    Fourth Anniversary 25 Likes 5 Answers 10 Comments
    Answer ✓

    Hi Alberto,

    add another block to your layout by adding the sales cube again; on the latter you must set the period offset to 364 below the time functions box.

    Alternatively you can always make it more dynamic, by performing the same calculation via the data flow step in a procedure.
    I hope this is useful.

    Best,

    Tommaso

  • Leone Scaburri
    Leone Scaburri Employee
    Fourth Anniversary 100 Comments 5 Answers 25 Likes
    Answer ✓

    Hi @Alberto Ceccato,

    there is a standard functionality called "Week Calendar" that allows Previous Year to refer to a Week calendar year where a year is made of a full number of weeks (52 or 53 weeks).

    Using the Previous Year function applied to the Week calendar retrieves data from the same week number of the year before. For example, if the current week is week number 2 of year 2023, applying the Previous Year function will retrieve data of week 2 of year 2022. 

    Note that this feature make it very simple to compare data of a certain day with the same day of the week of the previous year, i.e. compare a Saturday with the corresponding Saturday of the same week of the previous year.

Answers

  • Hey Alberto,

    Thanks for your question. I was trying to think of a response to your question, but I think it may help to get a little more clarification on what the issue is. At what level are you trying to view the data?

    Best,

    Hamza

  • Alberto Ceccato
    Alberto Ceccato Active Partner
    Level 100: Foundations of Building in Board First Comment
    edited March 2023

    Dear Hamza, thank you so much for the quick response.

    This is the chart I am interested about, my need is adding another line that shows the number of sales of the same day in the previous year. I already know how to do that, the goal now is analize the difference between two years specifying the name of the day: this is important because we sell a lot more during weekends and the 1st of the year's name change every year (last year was saturday, this year it was sunday).

    For example, if the 6th of February last year was sunday and this year is monday the charts now don't tell me anything about the actual performance, because it's obvious that we did better last year because it was weekend, I need to compare the 6th with the 7th of last year, so monday with monday.

    My idea was trying to use a custom time entity, the point is that I'm not sure if this could be a good solution.

    I hope everything is more clear now, let me know if you need additional information or if you want to make a teams session.

    Best,

    Alberto

  • Alberto Ceccato
    Alberto Ceccato Active Partner
    Level 100: Foundations of Building in Board First Comment

    Hey Hamza, thank you so much for the quick response.

    This is the chart I am interested about. The next goal is adding a line that refers to the performance of last year: I already know how to do that, the point is that comparing a 2023 day with the exact day of 2022 has no sense because the name of the day change and we sell a lot more on weekend.

    For instance, the 6th of March was on sunday last year, but this year it's monday: it's no sense comparing the two sales data because it's obvious that last year performance was better than this one's; I need to compare the performance of the 6th with the last year 7th, so monday with monday.

    Can you help me? I was thinking about creating a custom time entity, but I'm not sure this could be a good solution (I tried but I didn't achieve anything).

    Let me know if you want additional info or if you want to do a teams session.

    Best,

    Alberto

  • Alberto Ceccato
    Alberto Ceccato Active Partner
    Level 100: Foundations of Building in Board First Comment

    Hi Tommaso,

    Thank you so much for your help, your advise was quite usefull.

    Best,

    Alberto

  • Holly Rieke
    Holly Rieke Employee
    100 Likes 10 Comments New Community Member DACH
    admin

    @Alberto Ceccato If you'd like, you can select 'Yes' for 'Did this answer the question?' to indicate a good answer to your question!