0

Difference actual week- week prev year

Hello,

we would like to calculate the difference of an KPI actual year vs Previous year on weekly base (KW this year - KW prev Year). We have time attributes for Date, KW (i.e. KW40), Week Sequence (i.e.202340), Year etc)

I managed to calculate the difference by using current KW and Lag 1 on Year, but the problem is that we need to filter on the last 6 Weeks. When i do this, i loose the values of the previous year. Does anyone have a solution for my problem?

Regards Janine

4 replies

null
    • Redeemed from the Dark Side (Power BI)
    • Obee1
    • 1 yr ago
    • Reported - view

    What is KW -  a measure or an attribute?

    Also clarify what you mean by '6 week filter'. Are you Including this inside the KPI somehow or are you using the filter in your report that contains the KPI?

    • Janine_Ellner.1
    • 1 yr ago
    • Reported - view

    KW is calender week ==> an attribute of the time dimension. We need to build a formular (measure) that calculates the difference between actual week and same week number previous year for a measure. We want to use the original measure and the difference in a single discover (bar chartwitl trellis). We need to filter the chart on the last six weeks for the original measure anfd we want the difference to be shown above in a seperate trellis. 

      • Customer Solutions Architect
      • Moshe_Yossef
      • 10 mths ago
      • Reported - view

       

      So you want to show 6 weeks on the X axis, and have 3 trellis, current year, previous year and the difference?

    • Senior Director of Product
    • Ian_Macdonald
    • 9 mths ago
    • Reported - view

    Hi Janine,

    Use the dynamic list editor to create a list of the last 6 weeks. Select this list to appear in your Discovery and select your Lag 1 calculation for the previous year. Last year's values should show up because you are not now filtering on the weeks in the View, but re doing that in the dynamic list.

    Hope that helps.

    Ian

Content aside

  • Status Answered
  • 9 mths agoLast active
  • 4Replies
  • 91Views
  • 6 Following