Forum Discussion

jajaAtPowerbi's avatar
jajaAtPowerbi
Frequent Visitor
3 years ago
Solved

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 ...
  • tamerj1's avatar
    3 years ago

    Hi 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
            )
        )
  • jajaAtPowerbi's avatar
    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.