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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors