Forum Discussion

m_richardson's avatar
m_richardson
Frequent Visitor
3 years ago
Solved

Custom Column: Status based on future transactions

Hi   I have a table that contains data that looks like this:   Where I am tracking monthly transactions by Customer.  I've included the first day of the month to aid sorting etc.    What ...
  • amitchandak's avatar
    3 years ago

    m_richardson , you need new column like

     

    var _max = maxx(filter(Table, Table[Customer ID] = earlier([Customer ID]) && [First Day Month] < earlier([First Day Month])),[First Day Month])
    var _value = maxx(filter(Table, Table[Customer ID] = earlier([Customer ID]) && [First Day Month]=_max),[Transactions])
    return
    Switch( True(),
    isblank(_max) && isblank([Transactions]), "Inactive",
    isblank(_max) && not(isblank([Transactions])), "active",
    not(isblank(_max)) && (isblank(_value)) && not(isblank([Transactions])), "reactive",
    not(isblank([Transactions])), "active",
    "Inactive"
    )

     

     

    for inctive count you need

    Continuous streak : https://youtu.be/GdMcwvdwr0o