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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors