cancel
Showing results 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

Frequent Visitor

## ABC statics filter

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

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 =
_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
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]) )

Frequent Visitor

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.