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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

calculate percentage

Hi all, I'm trying to calculate the open rate for email messages based on the following data. How would I create a measure that divides emails opened/emails sent?

 

FeatureMonthTotal
Emails sentApril1000
Emails OpenedApril100
1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Percentage =

var _sent = Calculate (Sum(Table[Total]), Filter(ALLExcept(Table,Table[month])), Table[Feature]) = "Email sent")
var _open = Calculate (Sum(Table[Total]), Filter(ALLExcept(Table,Table[month])), Table[Feature]) = "Email opened")

Return
Divide(_open,_sent)

View solution in original post

3 REPLIES 3
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Measure =

var _sent = Calculate (Sum('Table'[Total]), Filter(ALLExcept('Table','Table'[month]), 'Table'[Feature] = "Emails sent"))
var _open = Calculate (Sum('Table'[Total]), Filter(ALLExcept('Table','Table'[month]), 'Table'[Feature] = "Emails Opened"))

Return
Divide(_open,_sent)
 
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

az38
Community Champion
Community Champion

 

@Anonymous 

Measure = 
DIVIDE(
CALCULATE(SUM(Table[Total]), Table[Feature] = "Emails Opened"),
CALCULATE(SUM(Table[Total]), Table[Feature] = "Emails sent")
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
harshnathani
Community Champion
Community Champion

Percentage =

var _sent = Calculate (Sum(Table[Total]), Filter(ALLExcept(Table,Table[month])), Table[Feature]) = "Email sent")
var _open = Calculate (Sum(Table[Total]), Filter(ALLExcept(Table,Table[month])), Table[Feature]) = "Email opened")

Return
Divide(_open,_sent)

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.