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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
effertz12
Helper I
Helper I

How to add calculation group to Matrix and display Calc Group name above the individual measures.

I have a bunch of calculation groups, and i would like to have them sub-columned under the name of the calculation group so that when i expand and collapse the rows the Calc group columns move with the measure columns. Is there any way of doing this like how i have it shown in the picture?
 
 
effertz12_1-1769187619540.png

 

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @effertz12 

To achieve the specific layout where measures are nested under group headers without redundant columns, you should use a Custom Mapping Table combined with a Dynamic Switch Measure. This approach effectively bypasses the default cross-join behavior of the Power BI Matrix visual.

Solution Overview
Create a Mapping Table: Define a disconnected table with the desired hierarchy:

Group Header: (e.g., Calc Group 1, Calc Group 2)

Measure Label: (e.g., Measure 1, Measure 2)

Sort Order: To ensure correct visual sequence.

Matrix Configuration: Place the Group and Label columns from this table into the Columns field of the Matrix.

Dynamic DAX Measure: Create a single measure using SELECTEDVALUE and SWITCH to return the specific calculation based on the column context in the mapping table.

Detailed Reference in the linked discussion :
https://community.fabric.microsoft.com/t5/Desktop/Remove-Secondary-columns-in-Matrix-Visual/m-p/4923...

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



Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

danextian
Super User
Super User

Hi @effertz12 

What’s being attempted can’t be done with calculation groups. Calculation groups are meant to apply the same logic across multiple measures, but they don’t allow selectively applying logic to only specific measures and hiding those measures when the logic no longer applies.

 

For example, Calc Group 1 can’t be applied only to Measures 1–5 and then automatically make those same measures disappear when the selected calculation item is no longer Calc Group 1.

 

Also, using multiple calculation groups in the same visual will result in a crossjoin between those groups with only the most bottom calc group in the hierarchy being applied.

 

You'll need a disconnected table which will serve as a display table. This table contains, the grouping, the measure names, sort values and format strings if the measures have different formats. Attached is an application of such an approach.

danextian_0-1769335455338.png

You display table will kind of look like below:

danextian_1-1769335618307.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
v-sgandrathi
Community Support
Community Support

Hi @effertz12,

 

I wanted to follow up on our previous suggestions regarding the issue. We would love to hear back from you to ensure we can assist you further.

 

Thank you.

v-sgandrathi
Community Support
Community Support

Hi @effertz12,

 

Thank you @danextian and @Ritaf1983 for your response to the query.

we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.

Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

danextian
Super User
Super User

Hi @effertz12 

What’s being attempted can’t be done with calculation groups. Calculation groups are meant to apply the same logic across multiple measures, but they don’t allow selectively applying logic to only specific measures and hiding those measures when the logic no longer applies.

 

For example, Calc Group 1 can’t be applied only to Measures 1–5 and then automatically make those same measures disappear when the selected calculation item is no longer Calc Group 1.

 

Also, using multiple calculation groups in the same visual will result in a crossjoin between those groups with only the most bottom calc group in the hierarchy being applied.

 

You'll need a disconnected table which will serve as a display table. This table contains, the grouping, the measure names, sort values and format strings if the measures have different formats. Attached is an application of such an approach.

danextian_0-1769335455338.png

You display table will kind of look like below:

danextian_1-1769335618307.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ritaf1983
Super User
Super User

Hi @effertz12 

To achieve the specific layout where measures are nested under group headers without redundant columns, you should use a Custom Mapping Table combined with a Dynamic Switch Measure. This approach effectively bypasses the default cross-join behavior of the Power BI Matrix visual.

Solution Overview
Create a Mapping Table: Define a disconnected table with the desired hierarchy:

Group Header: (e.g., Calc Group 1, Calc Group 2)

Measure Label: (e.g., Measure 1, Measure 2)

Sort Order: To ensure correct visual sequence.

Matrix Configuration: Place the Group and Label columns from this table into the Columns field of the Matrix.

Dynamic DAX Measure: Create a single measure using SELECTEDVALUE and SWITCH to return the specific calculation based on the column context in the mapping table.

Detailed Reference in the linked discussion :
https://community.fabric.microsoft.com/t5/Desktop/Remove-Secondary-columns-in-Matrix-Visual/m-p/4923...

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



Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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