Forum Discussion

pb202134's avatar
pb202134
Regular Visitor
4 years ago
Solved

calculated column for account status

I have created a simple calculated column that classifies customers based on when they made their last order into  the following:  Last order: within last 90 days: active between 91 and 180 da...
  • smpa01's avatar
    smpa01
    4 years ago

    pb202134  you referred to me as Greg_Deckler , try this, the one I gave you was for Calculated column as I thought you needed a calculated column

     

    Column =
    VAR _cal =
        TODAY () - MAX(Sales[Last transaction date])
    VAR _switch =
        SWITCH (
            TRUE (),
            _cal <= 90, "active",
            _cal > 91
                && _cal <= 180, "lapsing",
            _cal > 181
                && _cal <= 360, "lapsed",
            "dormant"
        )
    RETURN
        _switch