You can create:
- parameter "Top N" type integer, we can set it as a range for example from 1 to 100
- parameter "Enable filter" type boolean, when set to true it will enable the filter top N
- calculated field "Filter" defined as:
IF [Enable filter] then
INDEX()<[Top N] ELSE
Then just drag Filter to the Filters shelf.
Let me know if it helps,
You can create set which will accept top N values and use that set as a filter as below.
In will show top N values and Out will contain other than IN values.
If we select both then user can see all values.
Steps to Create SET.
Click on dimaension in my case I took customer wise sales. I have considered CUstomer Name object.
Now drag created set object in Rows Pane.
Select Show filter this will allow user to filter data.