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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
victoriashenton
Frequent Visitor

Filter matrix if a slicer is not selected

I have a matrix where the Column is 'Status' (e.g. complete, in progress, overdue, on hold) and the values are a count of these status. I also have a slicer which filters on these status. 

 

Is it possible to filter the matrix to only show 'In progress' and 'Overdue' when the slicer is not selected however if complete or on hold is selected in the slicer then it is shown in the matrix? 

5 REPLIES 5
shafiz_p
Super User
Super User

Hi @victoriashenton 

As I can understand that you have Status column and a count value of those status in matrix. See image of the scenario, you have described:

shafiz_p_0-1729591907951.png

 

Also, you have a slicer of the same status column, and you want, if you don't select slicer, matrix should show value of only status "In Progress" and "Overdue", other wise show value according to slicer selection i.e complete or on hold or both.

 


My solution:
I have used a disconnected table for slicer of the same status column. You can use dax or PQ to create such table of distinct status values. No relationship with other tables.

See image for disconnected table(Used this status column in the slicer):

shafiz_p_2-1729590862886.png

 

I have developed a measure to count status according to your requirement. This measure will count status for only "In Progress" and "Overdue" if slicer is not selected. Find code below:

 

 

 

Count = 
VAR _isfiltered = ISFILTERED(DistStatus[Status])
VAR _selectedValues = VALUES(DistStatus[Status])

VAR _Result =
IF(
    _isfiltered,
    COUNTROWS(
        FILTER(
            TabOrder,
            TabOrder[Status] IN _selectedValues
        )
    ),
    COUNTROWS(
        FILTER(
            TabOrder,
            TabOrder[Status] IN {"In Progress", "Overdue"}
        )
    )
)

RETURN
_Result

 

 

 

If slicer is selected, it will show only the selection, it could be multiple selection.

Now place this measure in matrix value section, go to filter pane, select that count measure to is not blank. See image below:

shafiz_p_3-1729591196822.png

 

Desired output:

Slicer not selected:

shafiz_p_4-1729591268766.png

 

After slicer selection, single and multiple:

shafiz_p_5-1729591311706.pngshafiz_p_6-1729591331921.png

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

 

Best Regards,
Shahariar Hafiz

Apologies I didn't make it clear in my initial message but I have the different status' as the columns and the rows are actually people's names

 

victoriashenton_0-1729594270532.png

So what you have done for the rows is what I would like to do for the columns

victoriashenton
Frequent Visitor

@bhanu_gautam Thanks for your assistance. When I do the ShowStatus DAX I am getting the following error:

A single value for column 'FilterStatus' in table 'FilterSort' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

Hello @victoriashenton , You are getting this error of the solution provided by @bhanu_gautam , because you have used naked column in measure, which is not possible without using any aggregation such as min, max. See images:

 

shafiz_p_0-1729589956948.png

 

Hope this helps!!

 

bhanu_gautam
Super User
Super User

@victoriashenton , First create a measure that checks if 'Complete' or 'On hold' is selected in the slicer.

 

SelectedStatus =
IF (
ISFILTERED('YourTable'[Status]),
IF (
COUNTROWS(
FILTER (
VALUES('YourTable'[Status]),
'YourTable'[Status] IN {"Complete", "On hold"}
)
) > 0,
1,
0
),
0
)

 

Create another measure that will be used to filter the matrix based on the slicer selection.

DAX
ShowStatus =
IF (
[SelectedStatus] = 1,
1,
IF (
'YourTable'[Status] IN {"In progress", "Overdue"},
1,
0
)
)

 

Add your matrix visual to the report.
Drag the ShowStatus measure to the visual-level filters pane of the matrix.
Set the filter to show only items where ShowStatus is 1.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors