Forum Discussion
How to make Matrix Table invisible until Slicer is selected
Hi, i'm trying to make a matrix table invisible unless a slicer option is selected.
My datasheet is comprised of 2 sheets:
1. Store A and B's monthly volume contributions
2. Store A and B's top 5 customer's monthly volume contributions
I'm using a unique name list table for both stores and customers as the table rows and this volume measure to show both overall store volume and the top 5 customer volume when i dropdown the table:
MEASURE - Volume =
SWITCH (
TRUE (),
ISCROSSFILTERED ( 'Unique Customers' [Customer] ), SUM ( 'Top 5 Customer Monthly Breakdow'[ Vol (L)] ),
SUM (Overview[Vol (L)]))Is there any way to have my table invisible unless a slicer connected to the unique store list table is used? I've tried
InvisibleMeasure =
IF (
ISFILTERED ( 'Stores'[Store] ),
1,
BLANK ()
) but the only result is that the volume total gets reduced (i'm assuming it removes sheet 1's overall volume and only includes the customers volume), rather than what i'm asking. Here is my test file for ease.
Fabric.pbix
Thanks!
Hi derekli1700
I'm not sure if there's an easy way to do this , but try to follow the following steps and see if it works for you ?
create following calculated table
support = UNION ( 'Unique Stores', { BLANK () } )make an inactive relationship between unique store table
create this measure
Select Status = VAR _countSelected = COUNTROWS ( ALLSELECTED ( 'Unique Stores'[Stores] ) ) VAR _countAll = COUNTROWS ( ALL ( 'Unique Stores' ) ) VAR _countAllNonBlank = COUNTROWS ( ALLNOBLANKROW ( 'Unique Stores'[Stores] ) ) RETURN IF ( _countAll = _countSelected, "N", IF ( _countSelected <> _countAllNonBlank, "Y", "A" ) )add this measure to the matrix filter and apply these rules
hide blank from your filter and add Unique Stores[Store] column to the matrix visual and it should work
4 Replies
- burakkaragoz
Super User
Hi derekli1700 ,
You can do this using a measure and the Visual-level filter trick. Here's how:
- Create a measure like this:
ShowMatrix = IF( ISFILTERED('YourTable'[SlicerColumn]), 1, 0 )- Add this measure to your Matrix visual as a Visual-level filter.
- Set the filter to show only when ShowMatrix = 1.
Now the Matrix will stay hidden until the user selects something in the slicer. Super handy for cleaner reports!
Let me know if you need help adjusting it to your model.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI - kushanNa
Super User
Hi derekli1700
you need something like this ?
no selection blank
I have just changed the row subtotal lable to overall Store Vol.
the measure i have used in here is
Combined Vol Measure = IF ( ISFILTERED('Unique Stores'[Stores]), IF ( ISINSCOPE('Unique Customers'[Customer]), SUM('Top 5 Customer Monthly Breakdow'[ Vol (L)]), SUM(Overview[Vol (L)]) ), BLANK() )matrix visual row is unique customer[customer]
- derekli1700
Helper III
Hi - this works really well thanks. If for instance, i selected multiple stores (my actual dataset has multiple stores), is there a way so a store row can be applied to differentiate each store's overall contribution?
- kushanNa
Super User
Hi derekli1700
I'm not sure if there's an easy way to do this , but try to follow the following steps and see if it works for you ?
create following calculated table
support = UNION ( 'Unique Stores', { BLANK () } )make an inactive relationship between unique store table
create this measure
Select Status = VAR _countSelected = COUNTROWS ( ALLSELECTED ( 'Unique Stores'[Stores] ) ) VAR _countAll = COUNTROWS ( ALL ( 'Unique Stores' ) ) VAR _countAllNonBlank = COUNTROWS ( ALLNOBLANKROW ( 'Unique Stores'[Stores] ) ) RETURN IF ( _countAll = _countSelected, "N", IF ( _countSelected <> _countAllNonBlank, "Y", "A" ) )add this measure to the matrix filter and apply these rules
hide blank from your filter and add Unique Stores[Store] column to the matrix visual and it should work