Forum Discussion
kolbra07
6 years agoFrequent Visitor
Changing Customer Payment Behaviours Over Time
We're looking at tracking a change in customer trends over a selected time period , so say they paid using one payment method in January but switched to a different payment method in March . Is there...
az38
6 years agoCommunity Champion
kolbra07 hi
of course, there is a way, but to choose the most appropriated one, please share your data sample and desired output
kolbra07
6 years agoFrequent Visitor
Yes of course so we have data like this :
Customer Payment Date Payment Method
A 8/1/20 Cheque
A 3/3/20 Bank Transfer
So we would like to show that customer A has changed their payment method from Cheque to Bank Transfer .
- az386 years agoCommunity Champion
Hi kolbra07
I still not sure how exactly it should look like but try a measure
Measure = var _curDate = MAX('Table'[Payment Date]) var _prevDate = CALCULATE(MAX('Table'[Payment Date]), 'Table'[Payment Date] < _curDate, ALLEXCEPT('Table', 'Table'[Customer])) var _prevPaymentMethod = CALCULATE(FIRSTNONBLANK('Table'[Payment Method], 1), 'Table'[Payment Date] = _prevDate, ALLEXCEPT('Table', 'Table'[Customer])) RETURN IF(_prevPaymentMethod <> MAX('Table'[Payment Method]) && NOT(ISBLANK(_prevPaymentMethod)), TRUE(), FALSE())- kolbra076 years agoFrequent Visitor
Thank you very much for your reply , i will try this . Early days for me with DAX , i am a SQL person but DAX is quite different i am finding !