cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper I

## Average of 10 Email Sends per Campaign

Hello,

I recently used DAX to create a 3 and 6 month rolling average which wasn't too difficult because it's a time intelligence calculation but now I'm looking to get an average of 10 email sends per campaign.

Attached below is a table with the columns as reference. For example, Adobe sends are usually 100K - 200K per send. I want to calculate the sum of 10 sends and get an average on that.

Any help will be greatly appreciated.

Thank you!

1 ACCEPTED SOLUTION
Community Support

Hi, @jytech

You can try the following methods. First figure out how to determine the order in which each point in time is sent.

``````Count =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
[Campaign Name] = SELECTEDVALUE ( 'Table'[Campaign Name] )
&& [Sent time] >= SELECTEDVALUE ( 'Table'[Sent time] )
)
)``````

Then sum the 10 most recent time sends.

``````Sum of the nearest 10 =
SUMX(FILTER('Table',[Count]<=10),[Sent])``````
``````Average of the nearest 10 =
AVERAGEX(FILTER('Table',[Count]<=10),[Sent])``````

Please see the attachment for details.

Best Regards,

Community Support Team _Charlotte

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, @jytech

Is there a time point for each send? Is it to calculate the sum of the 10 most recent sends at the most recent time? Is there any relevant example data, preferably available?

Best Regards

Helper I

Each send has a send date linked to it, and yes, I would like to calculate the sum of the 10 most recent sends filtered by the Campaign. Here's a screen shot (minus some sensitive data) as a reference.

Community Support

Hi, @jytech

You can try the following methods. First figure out how to determine the order in which each point in time is sent.

``````Count =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
[Campaign Name] = SELECTEDVALUE ( 'Table'[Campaign Name] )
&& [Sent time] >= SELECTEDVALUE ( 'Table'[Sent time] )
)
)``````

Then sum the 10 most recent time sends.

``````Sum of the nearest 10 =
SUMX(FILTER('Table',[Count]<=10),[Sent])``````
``````Average of the nearest 10 =
AVERAGEX(FILTER('Table',[Count]<=10),[Sent])``````

Please see the attachment for details.

Best Regards,

Community Support Team _Charlotte

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

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors