Forum Discussion

Vinagre01's avatar
Vinagre01
Frequent Visitor
1 year ago
Solved

Calculate Percentile Splitting Data Into One Column Instead of Many

I have a table with the following template:   cisp month type total 1 Jan A 15 2 Jan A 20 1 Jan B 30 2 Jan B 40 1 Feb A 50 2 Feb A 60 1 Feb B 70 2...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi  Vinagre01 ,

     

    Here are the steps you can follow:

    1. Create measure.

     

    Measure = 
    var _select=SELECTEDVALUE('Table'[type])
    return
    var _table1=
    FILTER(
        ALL('Table'),[type]=_select)
    var _table2=
    SUMMARIZE(
        _table1,[cisp],"Value",SUM('Table'[total]))
    
    RETURN
    PERCENTILEX.INC(_table2,[Value],1)
    

     

    2. Result:

     

     

    Best Regards,

    Liu Yang

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