Forum Discussion
Anonymous
6 years agoNot applicable
Top N dynamic variable
Hello, I have seen plenty of posts about how to change the 'N' in a Top N function, but I haven't seen anything about being able to create a function that lets you change what the Top N is based ...
parry2k
6 years agoSuper User
Anonymous I think you should create a dynamic measure based on what top n you want on and then use that measure in Top N measure, just an example
Measure for Top N =
IF ( SELECTEDVALUES ( Table[Slicer] ) = "Qty",
SUM ( Sales[Qty] ),
SUM ( Sales[Amount )
)