Forum Discussion

AlanP514's avatar
AlanP514
Post Patron
2 years ago

Conditional group dax

Pivot Table

I am trying to create conditional group or bin based on the measure 
I need to segragte all customer into three
Hyper active 
Super Active
Active
I Have created count of user who has logged in each month(Below is that measure)

Logins = Sumx(Facttracking, Fact tracking[Desktop count] +  Fact tracking[Mobile count]

so i have added user in the row section of the pivot , month in the section of column name and login in the measure value
so according to the sum of all values aganist each month
if the total sum of the count value  >= 5 i need to segregrate those customer into hyper active
if the total sum of the count value  = 3,4 i need to segregrate those customer into Super  active
if the total sum of the count value  = 1,2 i need to segregrate those customer into   active




Appreatiate help on this to create dax

 

2 Replies

  • You can try the following measure

    CustomerCategory =

    VAR TotalLogins = [Logins]

    RETURN

    SWITCH ( TRUE (),

    TotalLogins >= 5, "Hyper Active",

    TotalLogins >= 3 &&

    TotalLogins <= 4, "Super Active",

    TotalLogins >= 1 &&

    TotalLogins <= 2, "Active",

    BLANK ()

    )

  • Hi nirali_arora 
    Thanks for the answer and help, there is a small logic difference is in the logic
    i wanted to make the segregation aganist user if login value is greater  than five then hyper active but this should work if value should be greater than 5 for entire month then only the user will be hyper active custromer