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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.