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
Kolumam
Post Prodigy
Post Prodigy

SUM of Average

Hi All,

 

I have a table where I have the daily data same as the average of the month. When I want to sum all the average of the month data by quarter, I really can't figure out how to do it. Please help.

Capture.JPG

If you see the above table, I need to sum the average of a month by quarter.

 

Wrong output:

dasdadadasdadd.JPG

Correct output:

daffff.JPG

1 REPLY 1
Greg_Deckler
Super User
Super User

OK, I'm not typing all of that data in, paste in text if you would like a concrete solution versus something untested. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Also, I am not clear on exactly what you are asking for. So for each quarter, you want to do a sum of the daily average or should you take the monthly average of the days in the month and then sum that over the quarter? I am going to assume the latter.

 

So, you would do something along the lines of:

 

Measure = 
VAR __table = SUMMARIZE('Table',[Month Year],"__average",AVERAGE([Expected Generation [kWh]))
RETURN
SUMX(__table,[__average])

Mileage might vary because that's untested code.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.