Forum Discussion
Filter another visual by different field
- 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.
Gregg This is normal because when you select the bar of H it has 2 filters ( Date - on visual level & H as name ).
You can replace the measure on the line chart so it doesn't filter by dates.
Btw it is better to have always a Date table as dimention.
Timeline = CALCULATE ( SUM ( Table1[Amount] ); ALL ( Table1[Date] ) )
konstantinos I replaced Amount on the Line chart with the TimeLine measure. This has not changed the behavior - it is still filtering by Date (and Name), as in my second screenshot. I tried adding a date table, and adding a relationship to my fact table, then using then applying all to dimDAtes[Date]. That does not work either.
TimeLine = CALCULATE(SUM(Data[Amount]), ALL(dimDates[Date]))
Am I missing a step?
I realize the current behavior is normal, but it would be good to override this behavior, in this particular case.
Thanks for your help.
- konstantinos10 years agoMemorable MemberThis is strange..At least for the demo fata and schema works in my end.
Unless you have a different schema with Other dimension tables which might affect - or/ and bi directional relationships which affects crossfiltering.
Do you have the filter on date in Page or Report filter?