cancel
Showing results 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.

Frequent Visitor

## Average calculation needed

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
Community Support

Hi @keen ,

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

``````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.

3 REPLIES 3
Community Support

Hi @keen ,

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

``````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.

Frequent Visitor

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.

Super User

What is your formula for avg total sales/month?

Proud to be a Super User!

Announcements

#### 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

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors