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

Monthly Fixed Average

mdjoshua94_0-1623217552957.png

Dear all,

How do I calculate the avarage monthly sale in a year?

I want to report the values in a column chart as Total Sum/12 so that I can filter against the product type. For the above example, it would be 51/(3 months).

Please find below link to PBIX https://drive.google.com/file/d/1Ww6bpw2RGuG6z7ygYqVUqsSoP084rxxN/view?usp=sharing 

Regards,
Amateur PBI user

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @mdjoshua94 

 

You could add a month column and use this column in visuals. Then create a measure like below.

Average = 
VAR total = CALCULATE(SUM('Table'[Total Sale]),ALLEXCEPT('Table','Table'[Product]))
VAR months = CALCULATE(DISTINCTCOUNT('Table'[Month]),ALLEXCEPT('Table','Table'[Product]))
RETURN
DIVIDE(total,months)

061103.jpg

Is this what you want?

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @mdjoshua94 

 

You could add a month column and use this column in visuals. Then create a measure like below.

Average = 
VAR total = CALCULATE(SUM('Table'[Total Sale]),ALLEXCEPT('Table','Table'[Product]))
VAR months = CALCULATE(DISTINCTCOUNT('Table'[Month]),ALLEXCEPT('Table','Table'[Product]))
RETURN
DIVIDE(total,months)

061103.jpg

Is this what you want?

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@mdjoshua94 , Try something like this

calculate(AverageX(values(Date[Month]), [Total Sales]), allselected(Date))

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.