Forum Discussion
Gregg
10 years agoRegular Visitor
Filter another visual by different field
I want the visuals to interact in such a way that only some of the filters in the selected visual apply to the other visual, while other filters do not. Here's an example. The data is shown here ...
- 10 years ago
That worked Sean. I made a few modifications so that the filter is more dynamic, and can work for any date (not just months). Here are the steps I took.
1. Create a measure "Selected Date" which is the date selected.- Here we use MAX(Date), given that if one date is selected MAX(Date) will equal the date selectedSelected Date = MAX(Data[Date])
2. Create a measure "Filtered Amount"- This is the amount, filtered by the "Selected Date". Use this Filtered amount on the bar chart, instead of placing a filter on the visualizationFiltered Amount = CALCULATE(SUM(Data[Amount]), FILTER(Data, Data[Date] = [Selected Date]))
3. Add a date slicer to the chart so we can select the date that drives the bar chart.- Edit interactions so that the Line Chart and Table are not filtered by the date selected on the Date Slicer.4. Now when you select a date on the Date Slicer, the bar chart should filter by date, since it's using "Filtered Amount".The Line chart and table should not filter since interactions are off for those two, and the chart\table reference [Amount] and [Date] (not [Filtered amount] and [Selected Date])When a bar is selected (eg "H" bar), the Line chart & Table will filter by Name = "H" only, and not by Name and Date.Thanks for your help.
Anonymous
3 years agoNot applicable
I had this issue as well.
I had the date filter (current report) on the bar chart itself. So when I filtered the line graph it would also filter for the current report instead of being all report date datapoints.
The way I fixed this was to have a slicer that selected the current report for the bar chart. And then turned off the slicer for the line graph. Then when you selected the category name the line graph works.