Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I need to add a new measure to sum the total of newsletter sends. Currently my measure shows the total of ALL email campaign sends - this includes newsletters, webinar invites etc.
Solved! Go to Solution.
Try this
CALCULATE(
SUM('Mailchimp Campaign'[Send]),
FILTER(
'Mailchimp Campaign',
CONTAINSSTRING('Mailchimp Campaign'[Name],"newsletter")
),
USERELATIONSHIP('Mailchimp Campaign'[Sent On],'Date'[Date]))
To calculate the total number of newsletter sends, you can modify your measure by adding a filter condition using the CONTAINS function. Here's an example of how you can modify your measure to only calculate sends where the 'name' column contains 'newsletter':
Newsletter sends =
CALCULATE(
SUM('Mailchimp Campaign'[Send]),
USERELATIONSHIP('Mailchimp Campaign'[Sent On], 'Date'[Date]),
CONTAINS('Mailchimp Campaign', 'Mailchimp Campaign'[name], "newsletter")
)
Thank you
Hi @hpayne93
I havent' tested the below code, it should work
CALCULATE(
SUM('Mailchimp Campaign'[Send]),
FILTER(
'Mailchimp Campaign',
'Mailchimp Campaign'[Name] = 'newsletter'
),
USERELATIONSHIP('Mailchimp Campaign'[Sent On],'Date'[Date]))
Hey, thanks for the reply!
That doesn't quite work. I want to see the total where 'mailchimp campaign' [name] contains 'newsletter' -- do i need to use CONTAINSSTRING?
Try this
CALCULATE(
SUM('Mailchimp Campaign'[Send]),
FILTER(
'Mailchimp Campaign',
CONTAINSSTRING('Mailchimp Campaign'[Name],"newsletter")
),
USERELATIONSHIP('Mailchimp Campaign'[Sent On],'Date'[Date]))
It worked! Thanks very much
User | Count |
---|---|
84 | |
75 | |
63 | |
51 | |
45 |
User | Count |
---|---|
101 | |
43 | |
39 | |
39 | |
36 |