Forum Discussion
Dynamic
amitchandak , I tried by following the link you have shared but it's not working.
measure that I am using-
HI Anonymous,
It should help if you provide a pbix file with some dummy data to test.
Regards,
Xiaoxin Sheng
- Anonymous5 years agoNot applicable
Hello Anonymous , I could do the dynamic top N selection. But the problem I am facing is it's working only on List or on dropdown.
I want to do it on slider. But not working...
The measure I am using is =
TOPN_BP =VAR SelectedTop= SELECTEDVALUE(TopN[TopN])ReturnSWITCH(TRUE(),SelectedTop=0, [Measure],RANKX(ALLSELECTED(Table[field]),[Measure])<=SelectedTop,[Measure])Can you tell me why it's not working on slider?- Anonymous5 years agoNot applicable
HI Anonymous,
I think this should be related to selectedvalue function that you used to extract current data.
If you do not add 'alternateResult' in this function, it will return blank if the current selection equal to multiple values. (slider mode normally pick up the range of values)
SELECTEDVALUE function - DAX | Microsoft Docs
You can try to use the following measure formula if it works for your scenario:
TOPN_BP = VAR SelectedTop = SELECTEDVALUE ( TopN[TopN], MAX ( TopN[TopN] ) ) RETURN SWITCH ( TRUE (), SelectedTop = 0, [Measure], RANKX ( ALLSELECTED ( Table[field] ), [Measure] ) <= SelectedTop, [Measure] )Regards,
Xiaoxin Sheng