Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Problem: DAX Patterns New Customers -- customer orders seem to disappear in detail
Business case: My user wants to see a matrix visual that shows customers who made their first ever order to our company this year. It might look something like below:
This slicer has the field 'Sheet1'[Order Date] in it.
The summary matrix has the 'Sheet1'[Customer Key] for rows and [New Customer Orders] for Values.
The detail table has the following columns: 'Sheet1'[Customer Key], 'Sheet1'[Order Date], 'Sheet1'[Order Number], [New Customer Orders]. I intended for New Customer Orders to filter the table to new customers for 2023, but it is filtering to those new customers' orders that are associated with their first order date in 2023.
The summary table is correct, but the detail table seems to be omitting some of the new customers' orders that were submitted this year. The user would like to see every order submitted by the new customer this year, just not the orders associated with that new customers' first order date.
I used SQL BI's New and Returning Customers Pattern, but it doesn't quite seem to fit what I am doing: https://www.daxpatterns.com/new-and-returning-customers/
My user, for example, doesn't want break-outs of new customers by month. She just wants a count of the orders submitted so far this year by customers who made their first order in 2023.
This is the DAX I wrote based off of the Dynamic Absolute pattern:
I think my problem has sometihng to do with the [Date New Customer] variable filtering to the customers' earliest dates, but I'm not sure how to tell DAX to make sure to include the new customers' orders for all of 2023 in the Detail table.
Dummy model screenshot:
Note that Sheet1 has three columns, Customer Key, Order Date, and Order Number.
There is an inactive relationship between Sheet1's Order Date and Date's Date field.
Dummy data:
Order Date | Customer Key | Order Number |
5/5/2023 | 1 | A |
5/5/2023 | 1 | B |
5/7/2023 | 1 | C |
3/1/2022 | 2 | D |
4/1/2023 | 2 | E |
4/2/2023 | 3 | F |
4/2/2023 | 3 | G |
4/3/2023 | 4 | H |
4/5/2023 | 4 | I |
4/7/2023 | 4 | J |
4/8/2023 | 4 | K |
@powerquest1234 , Please refer to approaches I have use, change periods as per need
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retenti...
Customer Retention Part 5: LTD Vs Period Retention
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retentio...
Learn Power BI Advance - Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://youtu.be/EyL7KMw877Q
@amitchandak I'm sorry, but I'm not seeing how this helps with my problem.
For my dummy data, I adapted one of your formulas like so:
(Assume there is a slicer on screen where the user can select single 'Date'[Year] values)
This is the result table I am looking for:
Dummy data:
Order Date | Customer Key | Order Number |
5/5/2023 | 1 | A |
5/5/2023 | 1 | B |
5/7/2023 | 1 | C |
4/2/2023 | 3 | F |
4/2/2023 | 3 | G |
4/3/2023 | 4 | H |
4/5/2023 | 4 | I |
4/7/2023 | 4 | J |
4/8/2023 | 4 | K |
User | Count |
---|---|
77 | |
75 | |
61 | |
60 | |
46 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |