Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
https://drive.google.com/file/d/1ulGkZ0whCkSV0yAdHQ5Hr6P7KoxYROFb/view?usp=sharing
In the attached file, I am using the below formulas to check if it is a new customer for a particular year, based on Customer ID and Account No seperately
But I want to re calculate this logic to check if Either Customer ID is existing OR Account No is existing in previous year, then consider it as a new customer. ie. to combine the above formulas in a single formula.
So that cases like below are covered. in this example we need to check either Customer ID is existing in previous year or Account No is existing in previous year.
Link to pbix attached.
How to restructure the formula for this?
Solved! Go to Solution.
Hi, @Antmkjr
You can try the following methods.
Column:
New Customers? =
IF (
YEAR ( [Purchase Date] )
= YEAR (
CALCULATE (
MIN ( Sales[Purchase Date] ),
FILTER ( Sales, [Customer ID] = EARLIER ( Sales[Customer ID] ) )
)
),
1,
0
)
New Customers? =
IF (
YEAR ( [Purchase Date] )
= YEAR (
CALCULATE (
MIN ( Sales[Purchase Date] ),
FILTER ( Sales, [Customer ID] = EARLIER ( Sales[Customer ID] ) )
)
),
1,
0
)
The next judgments about your old and new accounts can be based on these two columns.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Antmkjr
You can try the following methods.
Column:
New Customers? =
IF (
YEAR ( [Purchase Date] )
= YEAR (
CALCULATE (
MIN ( Sales[Purchase Date] ),
FILTER ( Sales, [Customer ID] = EARLIER ( Sales[Customer ID] ) )
)
),
1,
0
)
New Customers? =
IF (
YEAR ( [Purchase Date] )
= YEAR (
CALCULATE (
MIN ( Sales[Purchase Date] ),
FILTER ( Sales, [Customer ID] = EARLIER ( Sales[Customer ID] ) )
)
),
1,
0
)
The next judgments about your old and new accounts can be based on these two columns.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Antmkjr
1. Is each AccountD associated with a customer?
2. How many different AccountID's can a customer have?
3. Can 2 different customers share an account?
1. Is each AccountD associated with a customer? -- Yes
2. How many different AccountID's can a customer have? -- Mostly 1, but not always, so we want to check either Cust ID is matching OR Account No is matching
3. Can 2 different customers share an account? -- No
User | Count |
---|---|
59 | |
22 | |
18 | |
18 | |
16 |
User | Count |
---|---|
87 | |
77 | |
52 | |
37 | |
21 |