cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
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-monthcustomer idproduct (bought)brand nameadvertising flag
2020/51waterDEF 
2020/53waterABC 
2020/62waterABCyes
2020/61waterABCyes
2020/63waterABCyes
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: brand switch analysis

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

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: brand switch analysis

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

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Helper II
Helper II

Re: brand switch analysis

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors