Forum Discussion
Anonymous
6 years agoNot applicable
Top N using multiple slicers
Hi, I need to rank performance of products using multiple slicers. For example, selecting top N products selling well in October 2020. The slicers here are Date and Top N. Please could someon...
Anonymous
6 years agoNot applicable
Hi v-xicai ,
I couldn't call [Value] after selectedTop= 0. Is it because [Value] should be a measure rather than a column?
Anonymous
6 years agoNot applicable
- v-xicai6 years agoCommunity Support
Hi Anonymous ,
If the [Value] is a column, you may change the formula like DAX below.
TopN Value = VAR _SelectedTop = SELECTEDVALUE ( 'TopN'[TopN] ) RETURN SWITCH ( TRUE (), SelectedTop = 0, SUM ( [Value] ), RANKX ( ALLSELECTED ( Table1 ), [Value] ) <= _SelectedTop, SUM ( [Value] ) )Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.