7 Replies Latest reply: Jun 8, 2016 12:28 PM by Gysbert Wassenaar RSS

    Current week v.s. different week previous year comparison (same number of days)

    Giuseppe Uleri

      Hi all,

      I would like to show sales data for each store comparing one week  to a different week in the previous year, provided that the end user can select weeks he want to compare.


      My model is quite simple, main fact table and two calendars (islands):



      What I'm not able to implement is the following part of the requirement: if the first week selected is the current one, i.e. only monday to tuesday data available since today is wednesday, I need to show sales for the other week up to tuesday and not the whole 7 days.


      Moreover, there can be situations in which for store A I have monday and tuesday data, for store B only monday



      I've tried with set analysis but I'm stuck on the point where sets are calculated once per chart, so I cannot show someting like this

      StoreSale No. Current WeekSales No. Previous Week


      Any ideas?


      Best regards,