Forum Discussion

Mncedi's avatar
Mncedi
Regular Visitor
3 years ago
Solved

Customer segmentation

I have a dataset that has customer classifications based on recognized behavior. The most frequent behave is ranked 1. Some customers have a rank of 1 in two different classifications, meaning same f...
  • eliasayyy's avatar
    eliasayyy
    3 years ago

    something like this?

     

     

     

    Label 1 = 
    VAR _c = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Rank],'Table'[Customer ID]))
    RETURN
    SWITCH(
        TRUE(),
        AND( 'Table'[Rank] = 1 , _c >1) , "Behavior Not Recogonized" ,
        AND('Table'[Rank] = 1 , _c = 1) , 'Table'[Class],
        BLANK()
    )