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
doume06
Helper I
Helper I

How to do an average of average?

Hi,

I have the following data set.

PBI1.PNG

 

First column : Population end of month

2nd column : Population beginning of month which is the population end of month of the previous month

calculated this way:
M Population beginning of month = CALCULATE(SUM('Feuil1'[Population end of Month]),DATEADD('Feuil1'[Year/Month],-1,MONTH))
3rd column: Monthly average which is the ('Population beginning of month' + 'population end of month')/2
Calculated this way:
M Monthly average = ('Mesures'[M Population beginning of month]+SUM(Feuil1[Population end of Month]))/2
Now I want to do an average of these Monthly averages on 6 or 12 months but Power BI does not seem to like a measure of a measure.

Any hints ?
I tried:
M average of average 6 months = CALCULATE(
AVERAGE([M Monthly average]),
DATESINPERIOD('Feuil1'[Year/Month],LASTDATE('Feuil1'[Year/Month]),-6,MONTH))
No success

Thanks a lot for your help in advance
Dom

 
 
7 REPLIES 7
PietroFarias
Resolver II
Resolver II

Try to use AVERAGEX. Something like:

Measure =
AVERAGEX (
    SUMMARIZE (
        tablePopulation,
        dcalendar[periodPopulation],
        "avgPopulation", measure_avgPopulation
    ),
    [avgPopulation]
)

 

amitchandak
Super User
Super User

@doume06 , Not very clear

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

refer if this can help

https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013

@doume06 is this what you are looking for

 

image.png

 

if yes here is the measure

 

Measure = AVERAGEX ( VALUES ( Feuil1[Year/Month] ), [M Monthly average] )

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k,

No actually this column, I can already calculate it.

What I need is the average on 6 months of values 650 + 750 + 850 + 950 + 1050 + 1150 = 900

Like here:

PBI2.PNGPBI3.PNG

 

Like here in Excel

MOYENNE is AVERAGE

 

@doume06 Hi there, the solution is attached. 

 

JAs a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.

https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-ca...

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks @parry2k I will try that.

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.