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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
abarnett
Helper I
Helper I

Matrix Help

Hello! I am trying to replicate a particular matrix format and I am on stuck on flipping the column hierarchy. I need the Actual and Goals to be underneath the measures. I have a calculation group called Metric type that holds two items, actual and goal. I've done something with a giant switch before but i'm trying to utilize something more dynamic.
Actual = SelectedMeasure()

Goal =
VAR MeasureName = SELECTEDMEASURENAME()
RETURN
SWITCH(
    TRUE(),
    MeasureName = "Number of Open Activities",       [Number of Open Activities Goal],
    MeasureName = "Number of Completed Activities", [Number of Completed   Activities Goal],
    BLANK()
)

 

Goal
Goal formatGoal format
Current
CurrentCurrent

 

3 REPLIES 3
v-saisrao-msft
Community Support
Community Support

Hi @abarnett,

Have you had a chance to review the solution we shared earlier? If the issue persists, feel free to reply so we can help further.

 

Thank you.

alish_b
Super User
Super User

Hi @abarnett ,


I don't think there is much help from the Calculation Groups in the expected presentation format. The calculation items (Goal and Actual) will show on the top and I believe the Column section of the matrix visual does not accept measures. 
Anyway, I played around with a disconnected table and dynamic measure approach to come up with something as follows:

alish_b_0-1770885460811.png

The disconnected table holds all the possible combinations of the matrix headers grouping and the dynamic measures switches as per the scope. I think the presentation is similar to the expected one (Column totals were turned off and Sort By Another column was used in the disconnected table). However, I am afraid that this could be the same giant SWITCH approach that you were referring to. 

Hope it helps!

v-saisrao-msft
Community Support
Community Support

Hi @abarnett,

In the Matrix visual, place your Measure (or a Measure field parameter) first in the Columns well, and then place your Calculation Group (Metric Type) under it. The Matrix renders the column hierarchy in the exact order it appears, so putting the Measure first and Metric Type second will display: Measure → Actual → Goal.
Goal =
SWITCH(
TRUE(),
ISSELECTEDMEASURE([Number of Open Activities]), [Number of Open Activities Goal],
ISSELECTEDMEASURE([Number of Completed Activities]), [Number of Completed Activities Goal],
BLANK()
)
Keep your calculation group with two items: Actual and Goal.
Use SELECTEDMEASURE() for Actual.
Use ISSELECTEDMEASURE() inside a SWITCH for Goal mapping.
In the Matrix visual, drag the Measure (or measure field parameter) first, then Metric Type (calculation group) into Columns.

 

If you are using Field Parameters, make sure their order is set correctly, or the layout may not behave as expected. Also, every measure you add must have a corresponding Goal measure mapped in the SWITCH logic; otherwise, the Goal column will return blank. If you have many measures, the SWITCH can grow larger and may slightly impact performance. Finally, Matrix subtotals and grand totals can sometimes behave differently with calculation groups, so you may need extra DAX if you want to control how totals appear.

 

Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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