Forum Discussion
Using slicer to filter columns
- 9 years ago
Please see the attached screenshots for the solution.Select the Date column and Create a Query step - unpivot other columnsCreate a samples tableCreate a connection with Samples TablePrepare a line chart with all the fields coming from the first tableSlicer should be coming from the Samples Table
Yes. It is a native behaviour of PowerBI. For Example, If the column A in Table is filtered, all the associated records in other columns will also be filtered.
Records in the year 2009Records in the year 2011
BhaveshPatel I know but it isn't what I want to do.
I would like to do something like that (line chart):
x axis: date (column from table 1)
y axis: sample1, sample2, sample3 (columns from table 1)
and simple slicer to pick which of sample should be displayed on the line chart at the moment.
It isn't row filtering.
- BhaveshPatel9 years agoSuper User
Thank you for your clarification. I don't think so you can put on columns on the slicer.
- mrrob9 years agoFrequent Visitor
Any ideas how can I do it another way?
- BhaveshPatel9 years agoSuper User
I am trying a solution for you. Once done, will definitely let you know.
- BhaveshPatel9 years agoSuper User
Please see the attached screenshots for the solution.Select the Date column and Create a Query step - unpivot other columnsCreate a samples tableCreate a connection with Samples TablePrepare a line chart with all the fields coming from the first tableSlicer should be coming from the Samples Table
- mrrob9 years agoFrequent Visitor
Thanks for solution.
One additional question. Can I change this slicer to multi select slicer? Now when I check 2 boxes the slicer summarize 2 samples column values to one line.
- BhaveshPatel9 years agoSuper User
Yes. You can do that as well. You need to create Index Column in your Fact Table in the Query Editor.
To do so, Go to the Edit Queries, Go to " Add Column" Tab, Select "Add Index Coulmn", Select From 1.
Load your Query Now.
Prepare the Graph as shown in the screenshot and You can view the 3 different lines for 3 different Samples.
3 lines for 3 samples.