Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Getting the middle segment of Customers.

Hello,   I have come across a problem where I am trying to segment my customer data based on another field (samples Submitted in this case), into top 20%; 40-80% and bottom 40% of customers. PowerB...
  • v-chenwuz-msft's avatar
    3 years ago

    Hi Anonymous ,

     

    Maybe you can refer the follwoing measure to do that:

    Measure = 
    var _s = SUMMARIZE(ALLSELECTED('Table'),[id],"sum",SUM('Table'[values]))
    var _1 = PERCENTILEX.INC(_s,[sum],0.2)
    var _2 = PERCENTILEX.INC(_s,[sum],0.6)
    var _20_60 = CALCULATETABLE(VALUES('Table'[id]),FILTER(_s,[sum]>=_1&&[sum]<=_2))
    return
    CALCULATE(COUNT('Table'[id]),FILTER('Table',[id] in _20_60))

     

    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.