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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Wael03
Helper I
Helper I

Percentages in matrix

Hello, 

 

I try to display the percentages of each sub category in a matrix using this code : 

3DS Ratio =
IF (
    ISFILTERED (Table1[3DS Merchant Name (Raw)*]),
    SUM (Table1[3DS AReq Count (Issuer)])
    /
    CALCULATE (
        SUM (Table1[3DS AReq Count (Issuer)]),
        ALL (Table1[3DS Merchant Name (Raw)*])
    ),
    IF (
        ISFILTERED (Table1[3DS ARes Category]),
        SUM (Table1[3DS AReq Count (Issuer)])
        /
        CALCULATE (
            SUM (Table1[3DS AReq Count (Issuer)]),
            ALL (Table1[3DS ARes Category])
        ),
        IF (
            ISFILTERED (Table1[3DS Requester Challenge Indicator]),
            SUM (Table1[3DS AReq Count (Issuer)])
            /
            CALCULATE (
                SUM (Table1[3DS AReq Count (Issuer)]),
                ALL (Table1[3DS Requester Challenge Indicator])
            )
        )
    )
)
 
Here is what I get :
 
Wael03_1-1688471720447.png

 

As you can see it works for the first category but then for the second one I got 5.84 and 8.7 in the first rows while I wanted something that makes 100% in total so for example 70% and 30%.

 

How can I modify the code to get that ?

1 REPLY 1
mlsx4
Memorable Member
Memorable Member

I think this link solves your problem 😉: https://www.youtube.com/watch?v=SglGMickzjA

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors