Forum Discussion
Adding a filter after removing filter context on the same column
- 2 years ago
Hi, rai024
will it be SUM('MIN_1069 (2)'[Value]) or SUM('MIN_1069'[Value])?
Also use this revised DAX see if it helps.
SelectedValue =
VAR MaxDate = CALCULATE(MAX(MIN_1069[Value.Date]), ALL(MIN_1069))
RETURN
CALCULATE(
SUM(MIN_1069[Value]),
ALL(MIN_1069[Value.Date]), -- remove any filter on the date column
MIN_1069[Value.Date] >= MaxDate - 6,
MIN_1069[Value.Date] <= MaxDate
)
Hi, rai024
will it be SUM('MIN_1069 (2)'[Value]) or SUM('MIN_1069'[Value])?
Also use this revised DAX see if it helps.
SelectedValue =
VAR MaxDate = CALCULATE(MAX(MIN_1069[Value.Date]), ALL(MIN_1069))
RETURN
CALCULATE(
SUM(MIN_1069[Value]),
ALL(MIN_1069[Value.Date]), -- remove any filter on the date column
MIN_1069[Value.Date] >= MaxDate - 6,
MIN_1069[Value.Date] <= MaxDate
)
- rai0242 years agoFrequent Visitor
Worked almost. I wanted the largest selected date so I removed the All from the variable and it worked. Thank you. I have been at this for a couple of days.
- rubayatyasmin2 years agoCommunity Champion
rai024 if my answer helped you then accept my answer as a solution. So that the thread is marked as completed.
Thanks.