Forum Discussion
jajaAtPowerbi
3 years agoFrequent Visitor
Why ALL is not working ?
would like to calculate the member count for the same period of last month, expect ALL will remove the filter context at Calendar, but seem no. Could you teach how to fix ...
- 3 years ago
Hi jajaAtPowerbi
Please tryredeemed member count (same period LM) = VAR StartDateLM = [start date LM] VAR EndDateLM = [end date LM] RETURN CALCULATE ( [redeemed member count], FILTER ( ALL ( 'Calendar' ), 'Calendar'[Date] >= StartDateLM && 'Calendar'[Date] <= EndDateLM ) ) - 3 years ago
tamerj1 it works by creating a local variable inside measure redeemed member count (same period LM) but i do not understand the difference.
Would you mind explain why?
Thanks you so much.
tamerj1
Community Champion
3 years agoHi jajaAtPowerbi
Please try
redeemed member count (same period LM) =
VAR StartDateLM = [start date LM]
VAR EndDateLM = [end date LM]
RETURN
CALCULATE (
[redeemed member count],
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= StartDateLM
&& 'Calendar'[Date] <= EndDateLM
)
)