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
gusdcruz
Helper I
Helper I

Customer Segmentation based on products purchased

I have a traditional sales sheet, name of the product, name of the customer, volume purchased and date of purchased. This file gets updated every single day. In the company we are looking into a program approach, where if a customer buys certain 3 products, not necessarly at the same time, let's same within the year; and those products contains the words "AMP", and the other product contains "LOL", and another product contains "HFR" this customer is a let's call a "SUPER" customer. If a customer buys only 2 of those products than this customer is "NOT SO SUPER".

any suggestion on how to accomplish this?

thank you

Gustavo

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @gusdcruz ,

 

Here I create a measure in my sample pbix.

 

Measure = 
VAR SUPER =
    CALCULATE (
        COUNTROWS ( Table1 ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[customer], Table1[date].[Year] ),
            "LOL" IN VALUES ( Table1[Product] )
                && "AMP" IN VALUES ( Table1[Product] )
                && "HFR" IN VALUES ( Table1[Product] )
        )
    )
VAR NOTSO =
    CALCULATE (
        COUNTROWS ( Table1 ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[customer], Table1[date].[Year] ),
            AND ( "LOL" IN VALUES ( Table1[Product] ), "AMP" IN VALUES ( Table1[Product] ) )
                || AND ( "LOL" IN VALUES ( Table1[Product] ), "HFR" IN VALUES ( Table1[Product] ) )
                || AND ( "HFR" IN VALUES ( Table1[Product] ), "AMP" IN VALUES ( Table1[Product] ) )
        )
    )
RETURN
    IF ( SUPER = 3, "Super", IF ( NOTSO = 2, "Not So super", "na" ) )

Capture.PNG

 

Pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Hi @gusdcruz ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @gusdcruz ,

 

Here I create a measure in my sample pbix.

 

Measure = 
VAR SUPER =
    CALCULATE (
        COUNTROWS ( Table1 ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[customer], Table1[date].[Year] ),
            "LOL" IN VALUES ( Table1[Product] )
                && "AMP" IN VALUES ( Table1[Product] )
                && "HFR" IN VALUES ( Table1[Product] )
        )
    )
VAR NOTSO =
    CALCULATE (
        COUNTROWS ( Table1 ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[customer], Table1[date].[Year] ),
            AND ( "LOL" IN VALUES ( Table1[Product] ), "AMP" IN VALUES ( Table1[Product] ) )
                || AND ( "LOL" IN VALUES ( Table1[Product] ), "HFR" IN VALUES ( Table1[Product] ) )
                || AND ( "HFR" IN VALUES ( Table1[Product] ), "AMP" IN VALUES ( Table1[Product] ) )
        )
    )
RETURN
    IF ( SUPER = 3, "Super", IF ( NOTSO = 2, "Not So super", "na" ) )

Capture.PNG

 

Pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @gusdcruz ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Sorry, Frank. I havent had a chance to work on this. Other porjects come around since my initial request here. I will let you know as soon as I can. I really appreciate your time helping me out here.

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.