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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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