Forum Discussion

maurcoll's avatar
maurcoll
Helper IV
1 year ago
Solved

Week comparison same week last year

Hi i need to create the below table the issue i have is that the week isnt bringing back the same week number last year it is bringing back the same date range. For example for week 11-17 Nov 24 i w...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi maurcoll,

    Try this checks to fix the issue

    If your current WeekIndex is, for example, 210, but there’s no data available for index 158 (210 - 52), then the CALCULATE function won’t find a match — resulting in a blank output.

    Test Last Year WeekIndex = SELECTEDVALUE('Calendar'[WeekIndex]) - 52

    Now, place the following in a table visual: 'Calendar'[Start of Week],'Calendar'[WeekIndex]


    Is WeekIndex a whole number?
    Is 'Start of Week' unique per row?
    Is the relationship on 'Date', not 'Start of Week'?
    Are you using MAX() instead of SELECTEDVALUE() in visuals?
    Does WeekIndex - 52 exist in your calendar table?

     

    Thank you & Regards,
    Prasanna kumar