Greg_Deckler
Community Champion
6 years agoLARGE
In my recent quest to create or catalog as many DAX equivalents for Excel functions, we have now arrived at the double secret RANKX pattern. Nifty.
LARGE =
VAR __k = [k Value]
VAR __Table...
Anonymous
3 years agoNot applicable
Hi Greg_Deckler
Thanks! This works with a couple of modifications for the purpose I need, so it can be listed in a table.
See below for anyone interested.
LARGE 3 =
VAR __k = [k Value]
VAR __Sorted = CONCATENATEX('Table', [Value], "|",[Value],DESC)
VAR __Table =
ADDCOLUMNS(
'Table',
"__Series" GENERATESERIES(1,COUNTROWS('Table'),1),
"__Value", PATHITEM(__Sorted,__k)
)
VAR __Result = MAXX(FILTER(__Table, __k = __k),[__Value])
RETURN
__Result