March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
I have a matrix table of individuals showing donations given annually with a grand total for each individual. The data in the table shows the individual in rows and each year in columns.
I would like have a "between" slicer to show records where the grand total falls into the selected range. For example, if the slicer range is $5000-$10000, I would like the table to be filtered to only show individuals whose total giving is between $5000-$10000.
Is it possible to accomplish this using a slicer?
Solved! Go to Solution.
See if this works.
Create a table to use as the slicer with the "New Parameter" option under Modeling in the ribbon. Enter the range of values:
Once the slicer is added to the page, change the input to "Between" in the slicer's dropdown options
I have the model set up like this. I will use the fields from the dimension tables in the matrix and the measure need to filter the matrix
The values in the Matrix are a simple SUM measure. To filter the rows based on the range in the slicer, create the following measure:
Filter by Range =
VAR MinSelected =
MIN ( 'Range of donations'[Range of donations] )
VAR MaxSelected =
MAX ( 'Range of donations'[Range of donations] )
RETURN
COUNTROWS (
CALCULATETABLE (
VALUES ( 'Name Table'[Name] ),
FILTER (
'Name Table',
[Sum Donations] >= MinSelected
&& [Sum Donations] <= MaxSelected
)
)
)
Select the matrix and add this [Filter by Range] measure to the filter pane. Set the value to = 1
and you get
I've attached the sample PBIX file
Proud to be a Super User!
Paul on Linkedin.
Is that the actual structure of your data? Do you need the slicer to be dynamic (users can select a range of values from say 100 to 10,000) or just the two ranges you posted?
Proud to be a Super User!
Paul on Linkedin.
not the actual structure.. the individual gifts are summed up in the table by year. I could use a data source that has the annual gifts already calculated in a field if needed. I want the slicer to allow any range to be selected and the data filter accordingly.
So you have a table with 3 columns: Name, year and donation?
Proud to be a Super User!
Paul on Linkedin.
sure, go with that. thanks so much for your help!
Sure. Any chance you can post some sample mock data to work on?
Proud to be a Super User!
Paul on Linkedin.
Name | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | Total |
Joe | 500 | 300 | 800 | ||||
Jack | 1000 | 1000 | 3000 | 1500 | 6500 | ||
Sam | 50 | 50 | 100 | ||||
Bob | 5000 | 5000 | |||||
Bill | 50 | 50 | 100 | 100 | 300 | ||
Mike | 2500 | 500 | 3000 | ||||
Susan | 1000 | 1000 | 1000 | 3000 | 6000 | ||
Stephanie | 400 | 50 | 50 | 100 | 100 | 700 |
rows in blue would show when the selected slicer range is $500-$1,000
rows in cyan would show when the selected slicer range is $5,000 - $10,000
See if this works.
Create a table to use as the slicer with the "New Parameter" option under Modeling in the ribbon. Enter the range of values:
Once the slicer is added to the page, change the input to "Between" in the slicer's dropdown options
I have the model set up like this. I will use the fields from the dimension tables in the matrix and the measure need to filter the matrix
The values in the Matrix are a simple SUM measure. To filter the rows based on the range in the slicer, create the following measure:
Filter by Range =
VAR MinSelected =
MIN ( 'Range of donations'[Range of donations] )
VAR MaxSelected =
MAX ( 'Range of donations'[Range of donations] )
RETURN
COUNTROWS (
CALCULATETABLE (
VALUES ( 'Name Table'[Name] ),
FILTER (
'Name Table',
[Sum Donations] >= MinSelected
&& [Sum Donations] <= MaxSelected
)
)
)
Select the matrix and add this [Filter by Range] measure to the filter pane. Set the value to = 1
and you get
I've attached the sample PBIX file
Proud to be a Super User!
Paul on Linkedin.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
76 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |