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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.