cancel
Showing results for 
Search instead for 
Did you mean: 

SAC previous year quantity calculation by week

adriano1973
Explorer
0 Kudos
152

Hello everyone

I have an date input control as a calendar, and I have a table that shows the quantities sold in the chosed year divided by weeks, and this is fine.

Now I want to show, week by week, also the quantities sold in the previous year in that particolar week (example if I see the week 17 in the 2025, I want to show close to this value , the quantity sold in the week 17 for the 2024).

If I try to implement this , SAC doesn't show me the value of the column of the week of the previous year.

If I try to set the hierarchy starting from month, I can see the quantity sold in the same month of the previous year, but if I try to drill down I get this error

adriano1973_0-1745565674868.png

Is there a way to achieve the result? And how?

Thank you for your reply

Adriano

 

View Entire Topic
Eladtayarr
Explorer
0 Kudos

Hey,

You should create a Custom "YearWeek" field.

During data preparation or model creation, add a calculated dimension:

[YEAR]&"-"&[WEEK]

Example: "2024-17", "2025-17", etc.

Then you can plot [YearWeek] along the x-axis and do manual comparison to previous year quantities using lookup formulas like LOOKUP() or Restricted Measures with Year-1 filter.

Hope I helped.