Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sureshponnuru
New Member

Aggregate Monthly Data from Week ending values

Hi Everyone,

 

I have the below master table which has Week Ending Date and sales values. I want to aggregate the week ending sales to month ending sales.

 

Original Table

Week EndingActual Sales
08-03-2020             27,949
15-03-2020             32,142
22-03-2020             34,638
29-03-2020             22,049
05-04-2020             25,168
12-04-2020             30,000

 

Expected Output

March 2020                        1,24,097
April 2020                            48,299

 

I am facing issues with splitting the sales data where the week has an overlap between 2 months. Could anyone help me with the logic of splitting the sales data and aggregate by month? Thanks.

 

Regards,

 

Suresh

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @sureshponnuru ,

 

I wonder how you get this:

March 2020                         1,24,097
April 2020                             48,299

25168/7*5+30,000 = 47977

This doesn't make sense.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
lbendlin
Super User
Super User

@sureshponnuru There is no logic.  Weeks and Months do not go well together. You need to find a procedural solution.

 

- give all the data to the new month

- give the data proportionally based on the number of days of that week in each month

- give all the data to both months

- exclude the data altogether

 

and so on - endless options.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.