cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashrat001
Helper I
Helper I

Grouping of Measures for Matrix Component

 

Hi Experts,

 

How can we group our measures into different groups for Matrix component? Thanks!

 

Measures Grouping.PNG

 

Regards!

 

Tariq Ashraf

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @ashrat001 ,

 

Try this:

 

1. Create a table.

 

Matrix = 
VAR Group_ =
    UNION (
        ROW ( "Groups", "Group1", "GOrder", 1, "Measures", "Measure1", "MOrder", 1 ),
        ROW ( "Groups", "Group1", "GOrder", 1, "Measures", "Measure2", "MOrder", 2 ),
        ROW ( "Groups", "Group1", "GOrder", 1, "Measures", "Measure3", "MOrder", 3 ),
        ROW ( "Groups", "Group2", "GOrder", 2, "Measures", "Measure4", "MOrder", 4 ),
        ROW ( "Groups", "Group2", "GOrder", 2, "Measures", "Measure5", "MOrder", 5 ),
        ROW ( "Groups", "Group2", "GOrder", 2, "Measures", "Measure6", "MOrder", 6 )
    )
RETURN
    Group_

 

Icey_1-1655350422951.png

 

2. Create a measure.

 

Combined Measure =
SWITCH (
    SELECTEDVALUE ( Matrix[Measures] ),
    "Measure1", [Measure 1],
    "Measure2", [Measure 2],
    "Measure3", [Measure 3],
    "Measure4", [Measure 4],
    "Measure5", [Measure 5],
    "Measure6", [Measure 6]
)

 

 

3. Create a Matrix visual.

Icey_0-1655350385562.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

1 REPLY 1
Icey
Community Support
Community Support

Hi @ashrat001 ,

 

Try this:

 

1. Create a table.

 

Matrix = 
VAR Group_ =
    UNION (
        ROW ( "Groups", "Group1", "GOrder", 1, "Measures", "Measure1", "MOrder", 1 ),
        ROW ( "Groups", "Group1", "GOrder", 1, "Measures", "Measure2", "MOrder", 2 ),
        ROW ( "Groups", "Group1", "GOrder", 1, "Measures", "Measure3", "MOrder", 3 ),
        ROW ( "Groups", "Group2", "GOrder", 2, "Measures", "Measure4", "MOrder", 4 ),
        ROW ( "Groups", "Group2", "GOrder", 2, "Measures", "Measure5", "MOrder", 5 ),
        ROW ( "Groups", "Group2", "GOrder", 2, "Measures", "Measure6", "MOrder", 6 )
    )
RETURN
    Group_

 

Icey_1-1655350422951.png

 

2. Create a measure.

 

Combined Measure =
SWITCH (
    SELECTEDVALUE ( Matrix[Measures] ),
    "Measure1", [Measure 1],
    "Measure2", [Measure 2],
    "Measure3", [Measure 3],
    "Measure4", [Measure 4],
    "Measure5", [Measure 5],
    "Measure6", [Measure 6]
)

 

 

3. Create a Matrix visual.

Icey_0-1655350385562.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.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors