Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
mathician
Helper II
Helper II

Percentage calculator sollutions

I want to calculate the precentage of all the columns that have Opened email. I have a tabell that takes in alle the email sent, one of column has 2 values, Opened and null. I want to make a powerbi card that shows percentage of opened emails.

 

I have tried alot of those dax solutions but non of them is working.

There might be a easy sollution for this, but i have been locked with this for couple of hours. 

 

1 ACCEPTED SOLUTION
avatorl
Impactful Individual
Impactful Individual

If you have a table with 'Status' column that conatins either "Opened" or null value and you need % of records with Status = "Opened" then this DAX will work:

% of opened :=
var _opened = CALCULATE(
COUNT ( 'Table'[Status] ),
FILTER ( 'Table', 'Table'[Status] = "Opened" )
)
var _all = COUNT ( 'Table'[Status] )
var _result = DIVIDE ( _opened, _all)
RETURN _result

View solution in original post

3 REPLIES 3
avatorl
Impactful Individual
Impactful Individual

If you have a table with 'Status' column that conatins either "Opened" or null value and you need % of records with Status = "Opened" then this DAX will work:

% of opened :=
var _opened = CALCULATE(
COUNT ( 'Table'[Status] ),
FILTER ( 'Table', 'Table'[Status] = "Opened" )
)
var _all = COUNT ( 'Table'[Status] )
var _result = DIVIDE ( _opened, _all)
RETURN _result

It worked perfectly. Thancks

avatorl
Impactful Individual
Impactful Individual

Glad to hear! You're welcome! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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