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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamically filter table based on slicer

Hello,

 

I am trying to dinamically filter a table visualization based on a slicer. 

I have a data table like the one below:

 

DateAttribute 1Attribute 2
01/01/2010Ared
01/02/2010Bred
01/03/2010Cred
01/04/2010Dred
01/05/2010Ablue
01/06/2010Bblue
01/07/2010Cblue
01/08/2010Agreen
01/09/2010Bgreen
01/10/2010Cgreen

 

The slicer has red, blue, and green as choices, and when clicking one of them, the table visualization should only show the rows corresponding to that choice.

I have created a slicer which outputs into a measure, however I can't find a way to link that into a filter for a table visualization. I've seen similar posts on the forum but they all seem to relate to calculating summaries based on a slicer, creating a measure which uses the SWITCH function , but here I don't need a summary eg. a sum, but I need all the values to show.

 

Any help or suggestion would be greatly appreciated.

 

7 REPLIES 7
ammcleod
Frequent Visitor

Hello @Anonymous ,

I'm not sure what you're asking for here, sorry! 

You want the Slicer to filter the table based on an option chosen from a measure? 

 

You can look into SELECTEDVALUE 
https://docs.microsoft.com/en-us/dax/selectedvalue-function 

Without more information I can't specifically help you, can you show me the measure you have? 

Anonymous
Not applicable

I don't understand your question. This is a simple table visual. If you add a slicer with that dimension, the rows in the visual will show only those rows. 

EricHulshof
Solution Sage
Solution Sage

Heya,

You can just put Attribute 2 in a slicer and select the color you'd like. The table should automaticly pick up and show only the red rows.

Naamloos.png


Quality over Quantity


Did I answer your question? Mark my post as a solution!


vanessafvg
Super User
Super User

@Anonymous  can you demonstrate using the data what you want to come out with?

 

are you saying if you click red only red rows should remain?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

@vanessafvg Yes here is an example:

 

If I click on red, then this will be the output:

 

DateAttribute 1Attribute 2
01/01/2010Ared
01/02/2010Bred
01/03/2010Cred
01/04/2010Dred

 

If I select green, this will be the output:

 

DateAttribute 1Attribute 2
01/08/2010Agreen
01/09/2010Bgreen
01/10/2010Cgreen

hi  @Anonymous 

You could just create a table visual that contains these three columns and a slicer that used Attribute 2.

Result:

1.JPG2.JPG

and here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous  what is the code for the measure?

 

im a little confused why can't this be achieved with a slicer?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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