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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jytech
Helper I
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.

PBI Fields.png

Any help will be greatly appreciated.

 

Thank you!

1 ACCEPTED SOLUTION

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] )
    )
)

vzhangti_0-1648015464867.png

 

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])

vzhangti_2-1648015654066.png

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.

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
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

Hi @v-zhangti 

 

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.

 

PBI Fields 2.png

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] )
    )
)

vzhangti_0-1648015464867.png

 

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])

vzhangti_2-1648015654066.png

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.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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