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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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