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
Anonymous
Not applicable

Return Customer and New Customer = with no purchase in last 100 days

Hi there,

 

Could someone suggest best way to find New customer and Return customer based on 100 Days rule from today().

I tried few methods, but not happy with the process.

 

New customer = if no order or previous order is older than 100 days.

so june report should show 2 new customers,1 return customer.

cust_numorder id order dateOutput expecting
A10X12004-24-2018New customer
B10X12101-25-2018New customer
C10X12201-26-2018New customer
B10X12303-10-2018Return customer
A10X12405-28-2018Return customer
C10X12506-20-2018New customer
B10X12606-30-2018New customer
A10X12706-30-2018Return customer

 

appreciate your help

 

Thank you

van2050

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Try this calculated column

 

Column =
VAR rule1 =
    CALCULATE (
        COUNTROWS ( Table1 ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[cust_num] ),
            Table1[order date] < EARLIER ( Table1[order date] )
        )
    )
VAR Calc =
    CALCULATE (
        MIN ( Table1[order date] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[cust_num] ),
            Table1[order date] < EARLIER ( Table1[order date] )
        )
    )
VAR rule2 =
    IF ( NOT ( ISBLANK ( Calc ) ), DATEDIFF ( Calc, Table1[order date], DAY ) )
RETURN
    IF ( OR ( rule1 = 0, rule2 > 100 ), "New", "return" )

Regards
Zubair

Please try my custom visuals

@Anonymous

 

Please see attached file as well

 

return.png


Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

Im unabel to load data before April 1st 2017, im getting same memory error even on 16 GB RAM desktop.

Any other way around ?

 

Thank you

Van

Anonymous
Not applicable

Thank you so much for the reply, i've applied it on my office laptop and it gives me 

" There's not enough memory to complete this operation. Please try again later when there may be more memory available."

 

Let me give a try on my desktop tomorrow, im using Pro license and not expecting limitations from Power BI side. Hope this is a memory issue, ill let you know.

 

Thank you again

Van

 

 

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.