Percentage Calculation

Hello,

I need help in calculating the % of Email and % of Phone with the help of a given table.
And need a visualization with 2 bars one should be email and other should be Phone with yes or no percentage.

Appreciate your help here…

Customer Name Email Status Phone Status
Cust 1 Yes Yes
Cust 2 Yes Yes
Cust 3 No Yes
Cust 4 Yes No
Cust 5 No No
Cust 6 No No
Cust 7 No No
Cust 8 Yes Yes
Cust 9 Yes No
Cust 10 Yes No

Hi @Nagi_k,

I hope this meets your requirement.
I’ve created 3 measures.

Customer Count = 
COUNTROWS( 
    ALL( Customers )
)

.

Email % = 
DIVIDE( 
    COUNTROWS( FILTER( Customers, Customers[Email Status] = "Yes") ),
    [Customer Count]
)

.

Phone % = 
DIVIDE( 
    COUNTROWS( FILTER( Customers, Customers[Phone Status] = "Yes") ),
    [Customer Count]
)

.
With this result

Here is the sample file: eDNA - Percentage calculation.pbix (18.2 KB)
I hope this is helpful.

1 Like

Hi Melissa,

Thank you for your inputs , but i want 2 bars in 1 visualization one should say Email with Percentage and other one should show me Phone with percentage. I am able to do for Email below is the screenshot but i need Phone also in the same visualization.

image

Something like this

Okay so you’ll need to unpivot your data…

image

Play around with this.
eDNA - Percentage calculation.pbix (22.9 KB)

3 Likes

Thank you so much…Could you please me know the steps for unpivoting.

Regards
Nag

Sure, no worries.

You can see the added step in Power Query for the Customer data table
All I did was select Customer Name and on the Transform tab, selected “Unpivot Other Columns”

Thank you :smiley: