Forum Discussion
Revived customer
Hi,
I'm trying to define customers according to whether they have "woken up". We have done some marketing campaigns and want to review their results. For this I would like to see the following: customers who have bought products before 2019 and have stopped and who have made another order afer july 2022.
So imagine you have been a customer to our company and for whatever reason stopped purchasing, but after you have seen our marketing campaigns you decided to place an order again.
The datamodel is really simple. I have 2 tables, 1 with order lines with orderNo_, customerId, itemNo_, amount, orderDate and one with customer data.
Does anyone from the Power BI community have any ideas on how to tackle this?
2 Replies
- speedramps
Super User
Try these measures ...
HasPre2019 = NOT(CALCULATE ( ISEMPTY(sales), Sales[orderdate] < DATE(2019,01,01)))
HadStop =
CALCULATE ( ISEMPTY(sales),
Sales[orderdate] >= DATE(2019,01,01) && Sales[orderdate] < DATE(2020,07,01))
HasPostJuly2020 = NOT( CALCULATE ( ISEMPTY(sales), Sales[orderdate] >= DATE(2020,07,01)))
HasReturned =IF([HasPre2019] && [HadStop] && [HasPostJuly2020], 1, 0)then add a blank report page canvas with a report visual with the Customer and HasReturnedHow it works:-the CALCUATE command changes the filter context using the order datethe ISEMPTY command is good method of checking if data exist or not and is much faster than counting and then checking for > 0the NOT command reverses the ISEMPTY from false to true.
i.e. returns true if it has data for the order date filter context, and false if it does not.Thanks for reaching out for help.
I put in a lot of effort to help you, now please quickly help me by giving kudos.
Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.
If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime. I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
- v-xiaotang
Community Support
Hi Rohan459
Thanks for reaching out to us.
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.