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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
keen
Frequent Visitor

Average calculation needed

keen_0-1703168396441.png

Hi Team,  this is yearly sales . i create a measure with divide 12 months . average for FY2023 is correct. But in fact 2024 sales is 6 months data only. Just wondering how to count FY2024 total sales / 6 months without affect my FY2023 ?Please advice me what is the best way. Thank You.

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

Hi @keen ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1703215514756.png

AVG = var _t = ADDCOLUMNS('Table',"count",COUNTX(FILTER(ALL('Table'),[year]=EARLIER([year])&&[Total]<>BLANK()),[Month]))
return AVERAGEX(_t,[Total]/[count])

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

3 REPLIES 3
v-tianyich-msft
Community Support
Community Support

Hi @keen ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1703215514756.png

AVG = var _t = ADDCOLUMNS('Table',"count",COUNTX(FILTER(ALL('Table'),[year]=EARLIER([year])&&[Total]<>BLANK()),[Month]))
return AVERAGEX(_t,[Total]/[count])

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

The total sales i have linked with a date table . Relationship is creation date (*) linked with date (1) .

The formula sharing is not suitable . Thanks for your sharing. 

Arul
Super User
Super User

@keen ,

What is your formula for avg total sales/month?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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