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
Jacklyn
Frequent Visitor

How do I SUM total production by month when i have hundreds of rows of production by daily date?

I have monthly budget production data, actual daily production data, prod category and prod location. I'm trying to compare budget vs actual production. The budget prod figure is in months whereas Actual production data is daily. 1) How do I sum up actual production by month so I can compare to budget prod figure?  2) Also I need to compare monthly budget to monthly actual by product category and also product factory (multiple locations). I'm 1 month-old new to Power Bi, and i'm struggling to produce a report for work. All help is appreciated!

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Jacklyn ,

 

I have built a data sample:

Eyelyn9_0-1654656073000.png

1. Production by each month:

Monthly Production = CALCULATE(SUM('Table'[Actual production]),ALLEXCEPT('Table','Table'[Date].[Year],'Table'[Date].[Month]))

2. Production by each month , each category and each factory:

Monthly Production by category & factory = CALCULATE(SUM('Table'[Actual production]),ALLEXCEPT('Table','Table'[Date].[Year],'Table'[Date].[Month],'Table'[Product Category],'Table'[Product Factory]))

Eyelyn9_1-1654656119360.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @Jacklyn ,

 

I have built a data sample:

Eyelyn9_0-1654656073000.png

1. Production by each month:

Monthly Production = CALCULATE(SUM('Table'[Actual production]),ALLEXCEPT('Table','Table'[Date].[Year],'Table'[Date].[Month]))

2. Production by each month , each category and each factory:

Monthly Production by category & factory = CALCULATE(SUM('Table'[Actual production]),ALLEXCEPT('Table','Table'[Date].[Year],'Table'[Date].[Month],'Table'[Product Category],'Table'[Product Factory]))

Eyelyn9_1-1654656119360.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you heaps Eyelyn!

ronrsnfld
Super User
Super User

In Power Query (Home=>Transform),

  • Add a column that returns the first day of each month from your date column
    • eg "=Date.StartOfMonth([Date])"
  • Group By that custom column and use the aggregations to return what you need.

Thank you too for this solution 😃

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.

Top Solution Authors
Top Kudoed Authors