Forum Discussion
Filtering based on Date Selection
- 4 years ago
I was able to resolve this adding a Max Date for the Month of Date Removed and then a Flag if Date Removed was >= the Max Date. I then filtered on the Flag. Thanks.
Hi Tihannah ,
I'd use a different Dates table to achieve this then create this measure to count the rows of Date Removed with which are either blank or less than or equal the currently selected period.
Is Active =
CALCULATE (
COUNTROWS ( 'Table' ),
ALL ( Dates ),
FILTER (
ALL ( 'Table'[Date Removed] ),
'Table'[Date Removed] <= MAX ( Dates[Date] )
|| 'Table'[Date Removed] = BLANK ()
)
)Please refer to this PBIX for your reference -https://drive.google.com/file/d/1lLJC0_SJMfDKYqT-q3DwFVkyTmx8aq_e/view?usp=sharing
This appears to be operating backwards to my goal. When I select January, the items removed in March and April do not show, and when I select April, the item from January is still there? I will be showing inventory counts, and if Apples were removed in January, then I do not want them to show on the list in April.