cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Resampling Four Weeks Data to Sixteen Weeks

I'm currently stuck on this problem.

• I have data that shows sales for four week periods; each row is a four week period.
• The column "week end" shows the end of this four week period.
• I want for each product to show sum of a sixteen week period (so four rows summed up).
• This means it will be resampled and it won't be rolling: so four rows get condensed to one.
• I'm struggling writing the measure that will allow me to do this; any help will be greatly appreciated

 what I have week_end product sales sales_yag 2018-05-27 product a 21 19 2018-06-24 product a 22 11 2018-07-22 product a 31 23 2018-08-19 product a 33 25 2018-09-16 product a 53 50 2018-10-14 product a 21 12 2018-11-11 product a 32 26 2018-12-09 product a 30 19 2018-05-27 product b 25 24 2018-06-24 product b 27 12 2018-07-22 product b 33 28 2018-08-19 product b 38 26 2018-09-16 product b 58 55 2018-10-14 product b 26 16 2018-11-11 product b 33 28 2018-12-09 product b 32 22

and here is what i want:

 what I want week_end product sales sales_yag 2018-08-19 product a 107 78 2018-12-09 product a 136 107 2018-08-19 product b 123 90 2018-12-09 product b 149 121

1 ACCEPTED SOLUTION

Accepted Solutions
Established Member

## Re: Resampling Four Weeks Data to Sixteen Weeks

Hi, @bmk266

You could create a new “Period “ column and assign “week_end” column to “Period” column. Then simply drag the sum sales and sales_yag into the visual will do your favorite.

Column:
PeriodEnd = SWITCH(TRUE(),

Table[week_end]<=DATE(2018,8,19), DATE(2018,8,19),

Table[week_end]>=DATE(2018,8,19), DATE(2018,12,09))

Measure:
sumsales =
SUM(Sheet1[sales])

sumsales_yag = SUM(Sheet1[sales_yag])

Paul
Best

Established Member

## Re: Resampling Four Weeks Data to Sixteen Weeks

Hi, @bmk266

You could create a new “Period “ column and assign “week_end” column to “Period” column. Then simply drag the sum sales and sales_yag into the visual will do your favorite.

Column:
PeriodEnd = SWITCH(TRUE(),

Table[week_end]<=DATE(2018,8,19), DATE(2018,8,19),

Table[week_end]>=DATE(2018,8,19), DATE(2018,12,09))

Measure:
sumsales =
SUM(Sheet1[sales])

sumsales_yag = SUM(Sheet1[sales_yag])

Paul
Best

Announcements

#### New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

#### Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

#### Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)