Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Julia997
Frequent Visitor

ABC statics filter

I have try to create ABC analysis, I have done the first cumulated but after that I found difficult.

 

My dataset is like this https://1drv.ms/x/s!AvMy-Bzzx3mqgwmKSZm6wr_W4VXr?e=Jwwbji&nav=MTVfezAwMDAwMDAwLTAwMDEtMDAwMC0wMDAwLT...

 

I need to diversify for each year (statical filter), how can I add?

 

RANK = RANKX(ALLSELECTED('TABLE'[NAME]),[FATT],,DESC,Dense)
 
M_Running total =
VAR _currentrank = [RANK]
VAR _t1 =
    CALCULATETABLE (
        SUMMARIZE ( 'TABLE', 'TABLE'[NAME] ),
        ALLSELECTED ( 'TABLE' )
    )
VAR _t2 =
    ADDCOLUMNS (
        _t1,
        "@Total", CALCULATE ( SUM ( 'TABLE'[FATT] ) ),
        "@Rank", [RANK]
    )
RETURN
    IF (
        ISINSCOPE ( 'TABLE'[NAME] ),
        SUMX ( FILTER ( _t2, [@Rank] <= _currentrank ), [@Total] )
    )

 

EDIT: how can I calculated the cumulated? I have try Measure= CALCULATE(SUM[Column]), ALL(Table)) but it doesn't work

2 REPLIES 2
MasterSonic
Helper IV
Helper IV

this perhaps

RANK = RANKX(FILTER(ALL('TABLE'), YEAR('TABLE'[DATE]) = SELECTEDVALUE(YEAR('TABLE'[DATE]))),[FATT],,DESC,Dense)

 

M_Running total = SUMX( FILTER( SUMMARIZE( 'TABLE', 'TABLE'[NAME], "Year", YEAR('TABLE'[DATE]) ), (YEAR('TABLE'[DATE]) = SELECTEDVALUE(YEAR('TABLE'[DATE]))) && (RANKX(FILTER(ALL('TABLE'), YEAR('TABLE'[DATE]) = SELECTEDVALUE(YEAR('TABLE'[DATE]))),[FATT],,DESC,Dense) <= [RANK]) ), SUM('TABLE'[FATT]) )

My year in this case is a text, not a date. How can I do? The second DAX doesn't work

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.