Forum Discussion
Issue with Date filter
Hello - can someone please help me out with the below, i received a reponse yesterday but unfortunately it did not solve my issue.
i have a slicer for Month/year, when i filter this slicer i am expecting my data to pull for the appropriate month selected. Some of my data are measures with a date calculation (the date table is unrelated). The issue I am running into, is that my data is only pulling YTD, so when i filter for June the data looks good but when i filter for May, it still keeps my June data. below is my measure, any ideas what i am doing wrong? I am assuming it has to do with a relationship of the filter?
It's rather odd to have a constant value as a filter in CALCULATE. Filter arguments should be tables or boolean conditions.
Maybe this will work more like you expect:
Stage 4a Actual test = VAR maxmonth = LASTDATE ( 'Consolidated Talent Snapshot (2)'[Data as of] ) RETURN CALCULATE ( DISTINCTCOUNTNOBLANK ( 'Consolidated Talent Snapshot (2)'[Associate ID] ), 'Consolidated Talent Snapshot (2)'[In Talent for Job Family] = "true", 'Consolidated Talent Snapshot (2)'[Data as of] = maxmonth ) + 0
1 Reply
- AlexisOlsonSuper User
It's rather odd to have a constant value as a filter in CALCULATE. Filter arguments should be tables or boolean conditions.
Maybe this will work more like you expect:
Stage 4a Actual test = VAR maxmonth = LASTDATE ( 'Consolidated Talent Snapshot (2)'[Data as of] ) RETURN CALCULATE ( DISTINCTCOUNTNOBLANK ( 'Consolidated Talent Snapshot (2)'[Associate ID] ), 'Consolidated Talent Snapshot (2)'[In Talent for Job Family] = "true", 'Consolidated Talent Snapshot (2)'[Data as of] = maxmonth ) + 0