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
Ki2024
Regular Visitor

Alter matrix display using measures in Power BI

Hi
I'm pretty new to Power BI. I've set up a number of measures and am trying to display them in a matrix visualisation in Power BI. This is what the matrix visual looks like at the moment, using Query as the rows and the 2 measures in the values field.

Ki2024_0-1732118611857.png

However, I want it to look like this:

Query

Value

22. Gender is Unknown 1

99

26. Gender is Other 1

12

Total

111


Does anyone know how I achieve this? Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Ki2024 

 

Thank you very much rajendraongole1 for your prompt reply. Allow me to offer some help.

 

I would speculate that your data might look something like this:

 

vnuocmsft_0-1732266716453.png

 

 

22. Gender is Unknown 1 = 
CALCULATE(
    SUM('Table'[values]),
    FILTER(
        ALL('Table'),
        'Table'[Query] = "22. Gender is Unknown 1"
    )
)

 

 

 

 

 

26. Gender is Other 1 = 
CALCULATE(
    SUM('Table'[values]),
    FILTER(
        ALL('Table'),
        'Table'[Query] = "26. Gender is Other 1"
    )
)

 

 

 

vnuocmsft_5-1732267152457.png

 

vnuocmsft_1-1732266753240.png

 

In fact, you can directly add the [Values] column to the "Values" of the matrix to achieve your expected effect.

 

vnuocmsft_0-1732678450653.png

 

You can get a matrix like this:

 

vnuocmsft_4-1732267082032.png

 

If you want to achieve this by creating a measure, try:

 

Value = SUM('Table'[values])

 

Here is the result.

 

vnuocmsft_1-1732678593708.png

 

If you still have problems, please provide some dummy data.

 

Regards,

Nono Chen

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
Anonymous
Not applicable

Hi @Ki2024 

 

Thank you very much rajendraongole1 for your prompt reply. Allow me to offer some help.

 

I would speculate that your data might look something like this:

 

vnuocmsft_0-1732266716453.png

 

 

22. Gender is Unknown 1 = 
CALCULATE(
    SUM('Table'[values]),
    FILTER(
        ALL('Table'),
        'Table'[Query] = "22. Gender is Unknown 1"
    )
)

 

 

 

 

 

26. Gender is Other 1 = 
CALCULATE(
    SUM('Table'[values]),
    FILTER(
        ALL('Table'),
        'Table'[Query] = "26. Gender is Other 1"
    )
)

 

 

 

vnuocmsft_5-1732267152457.png

 

vnuocmsft_1-1732266753240.png

 

In fact, you can directly add the [Values] column to the "Values" of the matrix to achieve your expected effect.

 

vnuocmsft_0-1732678450653.png

 

You can get a matrix like this:

 

vnuocmsft_4-1732267082032.png

 

If you want to achieve this by creating a measure, try:

 

Value = SUM('Table'[values])

 

Here is the result.

 

vnuocmsft_1-1732678593708.png

 

If you still have problems, please provide some dummy data.

 

Regards,

Nono Chen

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

 

 

rajendraongole1
Super User
Super User

Hi @Ki2024 - Create a new calculated table to flatten the data structure.
Use the UNION function in DAX to combine data from the two measures. 

 

Total values = SUMX(hytr,hytr[Measure1]+hytr[Measure2])
 
replace with your table name as pe ryour model

 

rajendraongole1_0-1732119622519.png

 

CombinedTable =
UNION (
    SELECTCOLUMNS(
        Hytr,
        "Query", Hytr[Query],
        "Value", [Total values]
    ),
    SELECTCOLUMNS(
        Hytr,
        "Query", Hytr[Query],
        "Value", [Total values]
    )
)
 
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks for that. I'm really new to Power BI. Would you be able to walk me through it in more detail please?

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.

Top Solution Authors