Forum Discussion
Filter Date Columns Based on Slicer selection
Hi amitchandak.
From what I can understand, your answer gives me a way to filter the table with the goal of using it in a calculation.
My question was if you could Visually filter the table, i.e. display only certain values for the user to see (without using it for anything else than display).
As a data sample you can see the following:
Table A
Date_Name Date_Field
2019 December 12/31/2019
Table B
Date_B
11/31/2019
12/20/2019
12/31/2020
After the "filtering", Table B would look like this (it excluded the row for 12/31/2020 which was a date after the Table A selection 12/31/2019):
Date_B
11/31/2019
12/20/2019
Anonymous , Not tested, but see if this can work
measure =
var _date = except(all(TableB[Date]),allselected(TableA[Date]))
return
calculate(countrows(TableB), filter(TableB, TableB[Date] in _date))- Anonymous6 years agoNot applicable
This seems to be working for the example that I presented. Thank you.
I oversimplified the problem, only mentioning the date columns. Would it be possible to apply a similar logic to 2 tables that have a different structure? (different set of columns, only the Date one being mutual).