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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
samblackshaw28
Frequent Visitor

Dynamic Matrix based on Group of Measures

Hi all,

 

I have 2 groups of measures which I want to be able to change on a visual with a slicer. The first group is called '1st Meetings' and contains 5 measures to do with 1st meeting numbers: [1st Meetings Completed MTD], [1st Meetings Completed WTD], [1st Meetings Incomplete MTD] etc etc. And the 2nd group of measures is the same but for 2nd meetings instead.

 

So, is it possible to make a matrix which shows the group of 1st meeting measures when selected, and vice versa. This would essentially be the same as adding a parameter but I want the slicer to be a parent to the group of measures, if that makes sense.

 

Thankyou for your help.

1 ACCEPTED SOLUTION
v-xianjtan-msft
Community Support
Community Support

Hi @samblackshaw28 

 

Power BI does not currently support grouping of measures by your needs, and as Ibendlin mentioned, If you would like to suggest some feature improvements, you can submit it in ideas. It is a place for customers provide feedback about Microsoft Office products.

 

While it is not possible to create measure groups directly, a similar effect can be achieved by calculating groupings. Please refer to the following steps to see if they help.

1. Manually create a measure selection table.

vxianjtanmsft_0-1726126782309.png

2. Use the following DAX to create a measure.

SelectedMeasure = 
SWITCH(
    TRUE(),
    SELECTEDVALUE(MeasureGroup[Measure]) = "Participants" && SELECTEDVALUE(MeasureGroup[Group]) = "1st Meeting", [1stMeeting_Participants],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Duration" && SELECTEDVALUE(MeasureGroup[Group]) = "1st Meeting", [1stMeeting_Duration],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Decisions" && SELECTEDVALUE(MeasureGroup[Group]) = "1st Meeting", [1stMeeting_Decisions],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Participants" && SELECTEDVALUE(MeasureGroup[Group]) = "2nd Meeting", [2ndMeeting_Participants],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Duration" && SELECTEDVALUE(MeasureGroup[Group]) = "2nd Meeting", [2ndMeeting_Duration],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Tasks" && SELECTEDVALUE(MeasureGroup[Group]) = "2nd Meeting", [2ndMeeting_Tasks],
    BLANK()
)

3. Create a slicer and put MeasureGroup[Group] into slicer.

4. Create a Matrix visual, put DateTable[Date] into Matrix Rows, MeasureGroup[Measure] into Matrix Columns, and measure SelectedMeasure into Matrix Values.

vxianjtanmsft_1-1726127181057.pngvxianjtanmsft_2-1726127202692.png

 

Best Regards,
Jarvis Tang
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

6 REPLIES 6
v-xianjtan-msft
Community Support
Community Support

Hi @samblackshaw28 

 

Power BI does not currently support grouping of measures by your needs, and as Ibendlin mentioned, If you would like to suggest some feature improvements, you can submit it in ideas. It is a place for customers provide feedback about Microsoft Office products.

 

While it is not possible to create measure groups directly, a similar effect can be achieved by calculating groupings. Please refer to the following steps to see if they help.

1. Manually create a measure selection table.

vxianjtanmsft_0-1726126782309.png

2. Use the following DAX to create a measure.

SelectedMeasure = 
SWITCH(
    TRUE(),
    SELECTEDVALUE(MeasureGroup[Measure]) = "Participants" && SELECTEDVALUE(MeasureGroup[Group]) = "1st Meeting", [1stMeeting_Participants],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Duration" && SELECTEDVALUE(MeasureGroup[Group]) = "1st Meeting", [1stMeeting_Duration],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Decisions" && SELECTEDVALUE(MeasureGroup[Group]) = "1st Meeting", [1stMeeting_Decisions],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Participants" && SELECTEDVALUE(MeasureGroup[Group]) = "2nd Meeting", [2ndMeeting_Participants],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Duration" && SELECTEDVALUE(MeasureGroup[Group]) = "2nd Meeting", [2ndMeeting_Duration],
    SELECTEDVALUE(MeasureGroup[Measure]) = "Tasks" && SELECTEDVALUE(MeasureGroup[Group]) = "2nd Meeting", [2ndMeeting_Tasks],
    BLANK()
)

3. Create a slicer and put MeasureGroup[Group] into slicer.

4. Create a Matrix visual, put DateTable[Date] into Matrix Rows, MeasureGroup[Measure] into Matrix Columns, and measure SelectedMeasure into Matrix Values.

vxianjtanmsft_1-1726127181057.pngvxianjtanmsft_2-1726127202692.png

 

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

Thankyou for your help Jarvis !

lbendlin
Super User
Super User

You seem to be describing the functionality of Field Parameters ?

I am but field parameters aren't grouped. So I would have to have all of the measures on the same slicer which I don't want. I want to be able to switch between 2 different groups of measures in the matrix.

 

Say I have a matrix, when the '1st Meeting' slicer option is selected, I want the matrix to show all the measures in that group, and when '2nd Meeting' slicer option do the same but for the group of 2nd meeting measures I have

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com

So it's not possible?

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors