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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
lcfaria
Helper II
Helper II

Dynamic Matrix - Selection from Slicers

Hello everyone, I need some help from the community.

 

I have a data model and I need to create a dynamic field in my matrix to bring the total number of records, based on the selection from my slicers.

 

What I have is this:
3 slicers with attrib. 1, attrib. 2 and attrib. 3.

1 matrix with a dynamic filter (I created a measure for this that you can see below) and the total of records.

PS: You can also find the pbix at the end of the post. 

 

My measure:

lcfaria_0-1707951616884.png

What happens is that this works very well if I have only a single selection in each slicer.
For example, if I select:
Attrib.1 = A1_Val2
Attrib.2 = A2_Val3
Attrib.3 = A3_Val1
This is my result and it's correct:

lcfaria_1-1707951814450.png

The problem I'm facing happens when I select more than 1 item in my slicers.
For example, if I select:
Attrib.1 = A1_Val2
Attrib.2 = A2_Val3
Attrib.3 = A3_Val1 and A3_Val3
This is the result I get, my selection for Attrib.3 disappears:

lcfaria_2-1707951903194.png

And I would like in this case my output to be this:

lcfaria_3-1707951929981.png

Since the data in my table is this:

lcfaria_4-1707952039031.png


Could someone help me with this?

 

This is the link to the PBIX file:
Sample_DynamicField.pbix

 

I appreciate the help from everyone in advance.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Have you considered using Field Parameters instead? They are designed exactly for this purpose, with little to no code needed.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Have you considered using Field Parameters instead? They are designed exactly for this purpose, with little to no code needed.

Hi @lbendlin I had to make some adjustments because the field parameters alone didn't solve everything, but it was a good way to reach the solution. Thank you for the help.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.