Forum Discussion

ali02's avatar
ali02
Frequent Visitor
8 years ago
Solved

ABC analysis with Slicer filter

Hi everyone,   So I have been wroking on ABC segmentation and did manage to create one. Now everytime if I need to filter my class, I have to go back again to the formula and change it. For e.g,  ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi ali02,

     

    You can add new table as the source of slicer, then use result as the variables of original formula.

     

    Sample:

    Source table:

    Table = GENERATESERIES(0,1,0.01)

     

    Measure formulas:

    Selected = 
    var _min= MINX(ALLSELECTED('Table'),[Value])
    var _max=MAXX(ALLSELECTED('Table'),[Value])
    return
    _min&"/"&_max
    
    
    ABC Class =
    VAR _min =
        MINX ( ALLSELECTED ( 'Table' ), [Value] )
    VAR _max =
        MAXX ( ALLSELECTED ( 'Table' ), [Value] )
    RETURN
        SWITCH ( TRUE (), [Cumulated %] <= _min, "A", [Cumulated %] <= _max, "B", "C" )
    

     

    Regards,

    Xiaoxin Sheng