Forum Discussion
group customer by orders
- 7 years ago
Hi again Anonymous
I updated my PBIX with the same dataset you have used in your Tableau workbook.
My existing measure is actually sufficient to do what you want.
I created the same visual you had in Tableau:
- Created First Purchase Date calculated column in Orders and related this to a First Purchase Date table:
Date of First Purchase = CALCULATE ( MIN ( Orders[Order Date] ), ALLEXCEPT ( Orders, Orders[Customer ID] ) )Note that I hid this column in Report View - Created Monts Since First Purchase calculated columns:
Months Since First Purchase = VAR MonthIndex = DATEDIFF ( Orders[Date of First Purchase], Orders[Order Date], MONTH ) RETURN "M" & FORMAT ( MonthIndex, "00" ) - Applied a Page Level Filter, Segment Name = "1 to 5"
- Placed my earlier measure Number of Customers by Order Count Segment in a matrix visual, with some conditional formatting similar to your Tableau example.
You could also create measures that apply particular segment filters, such as
Number Customer Purchase 1 to 5 = CALCULATE ( [Number of Customers by Order Count Segment], Segment[Segment Name] = "1 to 5" )PBIX attached. Please post back if needed.
Regards,
Owen
Note that when including both Months Since First Purchase and First Purchase Month on the visual , all customers have five or fewer orders.
- Created First Purchase Date calculated column in Orders and related this to a First Purchase Date table:
Hi,
The things that you said is correct.
But i tried the solution above, though it seems to be work, but it does not work. so if you have any solution,
please help me!!
Thanks
Hi,
Hasn't OwenAuger solved your problem? Also, my the solution at my link also solves the problem.
- Ashish_Mathur7 years ago
Super User
Whom are you replying to?
- Ashish_Mathur7 years ago
Super User
Hi,
Whil ei may be able to build the attrition table for you, i wll not be able to dynamically segment that attrition table. This is becuase there cannot be a relationship (active or inactive) between the Orders Table and the Segment Table. So, i may have to write 3 measures - one each for the 3 segments.
Also, in the Matrix visual that i build, i will have to show Years and Months in the column headers instead of M00, M01 etc.
- Anonymous7 years agoNot applicable
Thank you for your reply,
I just checked the result and I dont know why there something wrong here. It maybe from my mistakes.
If you have time, you could have a look at it and help me to fix it.
I also looked at your fomular, it almost the same that I want, but the thing I really want is to make the Cohort Analysis of Customer Segmentation!!
here is the link to the power bi workbook!! https://we.tl/t-Qk16HJsrPG
Thanks!!
- Anonymous7 years agoNot applicable
Ashish_Mathur I forgot to tag you in the post!! Sorry!
- Ashish_Mathur7 years ago
Super User
Hi,
There is no file there.
- Anonymous7 years agoNot applicable
- Anonymous7 years agoNot applicable
Dear Ashish_Mathur
Thank you for your reply.
Could you provide me the power bi file so that I could have a detailed formula and your solutions?
Thanks!!
- Ashish_Mathur7 years ago
Super User
Hi,
Check my reply dates July 6. There is a download link there.