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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Percentage of total

Hi guys,

 

I'm looking for some help with calculating a percentage per group and then the difference between the two. These are 2 matrixes coming from customer satisfaction surveys:

 

NPS PowerBI.JPG

 

The first one has all the results from 0-10 that clients can give us, with the number of times we got the specific result. The second matrix has the results grouped. 9-10 = Promoter, 7-8 are Passive, 0-6 Detractors. The number of times is just a measure using a count formula. The grouping in the 2nd matrix has been made in the column Net_Promoter_Score in the table FactsB2CRawdata. So the column name is 'FactsB2CRawdata'[Net_promoter_Score(groups)]

 

I'm now looking to create 2 calculations

- the percentage of "Detractor", "Passive" or "Promoter" vs total

- the outcome of % Promoters - % Detractors

 

Thanks in advance for your help,

best regards,

Jeroen

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample.

vkalyjmsft_0-1647590126514.png

This is my formula of times measure.

Tims =
CALCULATE (
    COUNT ( FactsB2CRawdata[Net_Promoter_Score] ),
    FILTER ( 'FactsB2CRawdata', 'FactsB2CRawdata'[Result] = "Yes" )
)

Get the correct result as yours.

vkalyjmsft_1-1647590264300.png

Here's my solution.

Create two measures.

Percentage = DIVIDE([Tims],CALCULATE([Tims],ALL(FactsB2CRawdata)))
% Promoters - % Detractors =
CALCULATE (
    [Percentage],
    'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Promoter"
)
    - CALCULATE (
        [Percentage],
        'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Detractor"
    )

Put the Percentage in the Values of the matrix, get the correct result.

vkalyjmsft_2-1647590419943.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample.

vkalyjmsft_0-1647590126514.png

This is my formula of times measure.

Tims =
CALCULATE (
    COUNT ( FactsB2CRawdata[Net_Promoter_Score] ),
    FILTER ( 'FactsB2CRawdata', 'FactsB2CRawdata'[Result] = "Yes" )
)

Get the correct result as yours.

vkalyjmsft_1-1647590264300.png

Here's my solution.

Create two measures.

Percentage = DIVIDE([Tims],CALCULATE([Tims],ALL(FactsB2CRawdata)))
% Promoters - % Detractors =
CALCULATE (
    [Percentage],
    'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Promoter"
)
    - CALCULATE (
        [Percentage],
        'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Detractor"
    )

Put the Percentage in the Values of the matrix, get the correct result.

vkalyjmsft_2-1647590419943.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

 

Whitewater100
Solution Sage
Solution Sage

Hello:

The general measure for this type of calculation is

Share % = DIVIDE(SUMX(FactsB2CRawdata[Net_promoter_Score(groups)],

SUMX(ALLSELECTED(FactsB2CRawdata), [Net_promoter_Score(groups)]))

 

Where the factable is the first part and your measure goes with it. You may need to substitute your inital count measure for the first share of total.

 

I hope this helps!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.