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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
VasTg
Memorable Member
Memorable Member

Group Measures

Hello,

 

I could not find the answer I am looking for in the forum, so creating a new thread.

Is there a way to basically group unrelated measures into some custom category?

I have a matrix like below.

 

Attribute 1Attribute 2Measure 1Measure 2Measure 3Measure xMeasure yMeasure z
        
        

 

Expected Results:

Cap11.PNG


How do I group Measure 1,2,3 to AAA and x,y,z to BBB. I don't want to use a slicer as well.

Appreciate the help.

 

Connect on LinkedIn
1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @VasTg ,

You can try this:

1. Create a new table.

group.PNG

2. Create a measure.

Measure =
IF (
    MAX ( 'Table'[Measure Name] ) = "Measure 1", [Measure 1],
    IF (
        MAX ( 'Table'[Measure Name] ) = "Measure 2", [Measure 2],
        IF (
            MAX ( 'Table'[Measure Name] ) = "Measure 3", [Measure 3],
            IF (
                MAX ( 'Table'[Measure Name] ) = "Measure x", [Measure x],
                IF (
                    MAX ( 'Table'[Measure Name] ) = "Measure y", [Measure y],
                    IF ( 
                        MAX ( 'Table'[Measure Name] ) = "Measure z", [Measure z] )
                )
            )
        )
    )
)

3. Create a Matrix visual and keep "Stepped layout" unselected.

group3.PNG

group2.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

2 REPLIES 2
Icey
Community Support
Community Support

Hi @VasTg ,

You can try this:

1. Create a new table.

group.PNG

2. Create a measure.

Measure =
IF (
    MAX ( 'Table'[Measure Name] ) = "Measure 1", [Measure 1],
    IF (
        MAX ( 'Table'[Measure Name] ) = "Measure 2", [Measure 2],
        IF (
            MAX ( 'Table'[Measure Name] ) = "Measure 3", [Measure 3],
            IF (
                MAX ( 'Table'[Measure Name] ) = "Measure x", [Measure x],
                IF (
                    MAX ( 'Table'[Measure Name] ) = "Measure y", [Measure y],
                    IF ( 
                        MAX ( 'Table'[Measure Name] ) = "Measure z", [Measure z] )
                )
            )
        )
    )
)

3. Create a Matrix visual and keep "Stepped layout" unselected.

group3.PNG

group2.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.

 

Hi @Icey, your recommendation is amazing and helped with what i need as well!

Just one more refinement I wonder if it is possible to have each measure with different decimal places? I seem to only be able to get everything in the same format e.g. 2 decimal places but i want some columns as whole numbers and some decimal places!

Thanks heaps in advance!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.