Forum Discussion

Tihannah's avatar
Tihannah
Resolver II
3 years ago
Solved

Prior Week Calculation with Segments

My Prior Week Calculation is working fine... until I bring segments in.   This is my dax: Prior Wk Sales = CALCULATE(SUM(Table[Sales]),FILTER(ALL(Date Table),Date Table[WeekRank]=MAX(Date Table[W...
  • danextian's avatar
    3 years ago

    Hi Tihannah,

     

    I've tried recreating your use case usnig my dummy data and it seems that your segment table doesn't have a relationship with your fact/sales table. You can see in the screenshot below that prior week is split into segments

     

    Without the relationship, you'll see equal amounts for each segment by week.

    Please see attached pbix for your reference.