cancel
Showing results for
Did you mean:
Highlighted
Helper II

## 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-month customer id product (bought) brand name advertising flag 2020/5 1 water DEF 2020/5 3 water ABC 2020/6 2 water ABC yes 2020/6 1 water ABC yes 2020/6 3 water ABC yes
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX

## Re: brand switch analysis

@nabe , for the new customer, you can column/measure rank of Month inside the customer , so rank one means new.

Proud to be a Super User!

2 REPLIES 2
Highlighted
Super User IX

## Re: brand switch analysis

@nabe , for the new customer, you can column/measure rank of Month inside the customer , so rank one means new.

Proud to be a Super User!

Highlighted
Helper II

## Re: brand switch analysis

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
)

Announcements

#### August Community Highlights

Check out a full recap of the month!

#### August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

#### Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors