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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Slicer that filters matrix row subtotal

After being berated on stack overflow I though I'd try my question here. I have a dashboard for attendance at a school district. My source data is the following query:

 

Query.png

 

This is a large query made up of 2m+ rows, it is each non null value in our attendance table. This includes "Periods" All day, P0, P1, P2,..., P9. I made a Matrix that summarizes this data:

 

Dashboard.png

 

Under my Attendance Filters I have a "between" slicer labeled "Test", this is a calculated column from a summary table:

 

Summary Table = SUMMARIZE('Period Attendance','Period Attendance'[Student ID], "Period Count", COUNT('Period Attendance'[Attendance Code]),"test", COUNTROWS(VALUES('Period Attendance'[Attendance Code])))   

However, this is static. I have row level security for users district wide, and the min max does not change with and slicer or filter.

 

Lastly, here are my connections, it's very messy but I want to give as much info as possible:

 

rgivens_0-1684860277028.png

 

Desired Result: I want to have a dynamic min max slicer that can set a limit for the matrix row subtotals. If I filter the school and attendance codes, I want the min and max to change with the matrix.

 

 

4 REPLIES 4
WNAGGE
Frequent Visitor

Did you ever find a solution for this? I am trying to solve the same problem, want to filter the subtotals but maintain context from other slicers.

WNAGGE
Frequent Visitor

Update for anyone who may run into this issue in the future, I have found a solution:

 

Create a parameter through Modeling -> New Parameter. It seems there is a bug in Power Bi where the parameter slicer value will change on it's own if you have more than ~1000 values, workaround for this is change it from "Greater than or Equal to" to "Between" in slicer settings. This seems to fix it.

 

In the parameter Measure, change the one to Min(parameter) and create another for Max(parameter). By default it is SELECTEDVALUE(parameter)

 

Create a new measure, mine is 

Filter = IF(AND([Total]>=[MIN],[Total]<=[MAX]),"TRUE","FALSE")
 
Apply this measure as a visual level filter to all visuals that you want it to affect.
 
Greg_Deckler
Community Champion
Community Champion

@Anonymous I'm not fully understanding "set a limit for the matrix row subtotals", can you explain that? Are you looking for a "selection" measure or you want the subtotals to actually cap out at certain values? If either of those are the case, these might help:

The Complex Selector - Microsoft Fabric Community

Matrix Measure Total Triple Threat Rock & Roll - Microsoft Fabric Community

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler Here's an example, I have my matrix showing every attendance code for every student. I want to see students who have between 10 and 15 attendance codes for code A. I'm trying to figure out the code that can set the upper and lower limit for the matrix subtotal by row. 

 

The way I'm trying to do this is by creating a dynamic column that counts rows based on what i'm filtering, then putting that column into a between slicer.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors