Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
akhatri
Helper I
Helper I

New Account (1st purchase and if customer has not purchased for last 3years)

Hi Everyone,

 

I've been trying to get my head around this but am struggling. I have the formula to flag New Accounts which is working great (below),

 

Customer first appearance text =
VAR _minDate =
CALCULATE (
    MIN ('SFDC Opp'[Bill Date Fiscal Period Value]),
    FILTER ('SFDC Opp', 'SFDC Opp'[Parent Account (Anaplan)]  =  Earlier('SFDC Opp'[Parent Account (Anaplan)])),
    FILTER('SFDC Opp','SFDC Opp'[Stage Name]="Billed" || 'SFDC Opp'[Stage Name]="Booked"),
    FILTER('SFDC Opp','SFDC Opp'[Net Rev merged DI]>0))
RETURN
IF('SFDC Opp'[Bill Date Fiscal Period Value] = _minDate,"New","Existing")
 
Customer 1st Appearance.JPG
 
However our company rule for New Accounts is if the customer has not purchased in the last 3 years (or since their 1st purchase) then they are classified as a New Account, so in the above example line 3, 4 and 7 should say "New" and line 1, 2, 5 and 6 should say "Existing"
 
How can I adjust the above formula to carry this calculation out?
 
Thanks in advance
Atish
1 REPLY 1
akhatri
Helper I
Helper I

Any help here would be greatly appreciated

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.