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
Aimeeclaird
Helper IV
Helper IV

Matrix Visual and % totals / measure

I am working with some survey data.

 

I have a matrix that shows the row total calculating the % split between job roles. Then the % of responses based on the entire dataset. I want to show the % by job role. 

 

For example, 25% respondants were teachers, the following % for the responses should total 100% not 25%.

 

Aimeeclaird_1-1628689498561.png

 

Aimeeclaird_2-1628689518107.png

 
Jan % Responses 2 = CALCULATE(
 
COUNTROWS('Combined W/out Overall Trust'),
FILTER('Combined W/out Overall Trust', 'Combined W/out Overall Trust'[Survey Cycle] = "January Data"))
/
CALCULATE(
COUNTROWS('Combined W/out Overall Trust'),
FILTER(ALL('Combined W/out Overall Trust'),
'Combined W/out Overall Trust'[Survey Cycle] = "January Data"))

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Aimeeclaird ,

 

Try this:

Jan % Responses 2 =
VAR JobRole_ =
    CALCULATE (
        COUNTROWS ( 'Combined W/out Overall Trust' ),
        FILTER (
            ALLEXCEPT (
                'Combined W/out Overall Trust',
                'Combined W/out Overall Trust'[Job Role]
            ),
            'Combined W/out Overall Trust'[Survey Cycle] = "January Data"
        )
    )
VAR All_ =
    CALCULATE (
        COUNTROWS ( 'Combined W/out Overall Trust' ),
        FILTER (
            ALL ( 'Combined W/out Overall Trust' ),
            'Combined W/out Overall Trust'[Survey Cycle] = "January Data"
        )
    )
VAR Response_ =
    COUNTROWS ( 'Combined W/out Overall Trust' )
RETURN
    SWITCH (
        TRUE (),
        HASONEFILTER ( 'Combined W/out Overall Trust'[Response] ), DIVIDE ( Response_, JobRole_ ),
        HASONEFILTER ( 'Combined W/out Overall Trust'[Job Role] ), DIVIDE ( JobRole_, All_ ),
        1
    )

 

And I have create a simple sample for reference:

percent.PNG

 

 

 

Best Regards,

Icey

 

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

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @Aimeeclaird ,

 

Try this:

Jan % Responses 2 =
VAR JobRole_ =
    CALCULATE (
        COUNTROWS ( 'Combined W/out Overall Trust' ),
        FILTER (
            ALLEXCEPT (
                'Combined W/out Overall Trust',
                'Combined W/out Overall Trust'[Job Role]
            ),
            'Combined W/out Overall Trust'[Survey Cycle] = "January Data"
        )
    )
VAR All_ =
    CALCULATE (
        COUNTROWS ( 'Combined W/out Overall Trust' ),
        FILTER (
            ALL ( 'Combined W/out Overall Trust' ),
            'Combined W/out Overall Trust'[Survey Cycle] = "January Data"
        )
    )
VAR Response_ =
    COUNTROWS ( 'Combined W/out Overall Trust' )
RETURN
    SWITCH (
        TRUE (),
        HASONEFILTER ( 'Combined W/out Overall Trust'[Response] ), DIVIDE ( Response_, JobRole_ ),
        HASONEFILTER ( 'Combined W/out Overall Trust'[Job Role] ), DIVIDE ( JobRole_, All_ ),
        1
    )

 

And I have create a simple sample for reference:

percent.PNG

 

 

 

Best Regards,

Icey

 

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

Greg_Deckler
Community Champion
Community Champion

@Aimeeclaird Have you looked at the options for Percent of Grand Total, Percent of Column Total, etc.?

Solved: How To Display Percentage of Total - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

I have and unfortunately it isn't doing what I need. Not sure if it my Measure?

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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