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

brand switch analysis

Hi,

 

I want to do a brand switch analysis, 

 

i have following table, where in 2020/6 the brand "ABC" did an advertising campaign for their product "water".

 

I want to get 3 values:

1) new customer (during campaign) -> 1 (customer id no. 2)

2) brand switch (during campaign) -> 1 (customer id no. 1, switch from DEF to ABC)

3) repeat (no change in purchase behaviour)  -> 1 (customer id no.3 , no change before and after the campaign bought ABC's water)

 

year-monthcustomer idproduct (bought)brand nameadvertising flag
2020/51waterDEF 
2020/53waterABC 
2020/62waterABCyes
2020/61waterABCyes
2020/63waterABCyes
1 ACCEPTED SOLUTION
2 REPLIES 2
Anonymous
Not applicable

thanks, these articles were helpful!

I thought I'd share my solution quickly.

 

new customer=

RANKX(
FILTER(
     'table',
          [product_name] = EARLIER([product_name])
   && [customer_id]=EARLIER([customer_id])

),
[date],,ASC
)
 
 
brand-change customer =
IF (
COUNTAX (
FILTER (
        'table',
              [customer_id] = EARLIER([customer_id])
       && [date] <= EARLIER([date])
       && [product_name] = EARLIER([product_name])
       && [brand name] <> EARLIER([brand name])
), [customer_id]
) = 1,
1,
0
)

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.