Forum Discussion
TOPN dynamic
Hi,
Write the RANKX function instead and filter the result of the RANKX function with a crtieria of say <=3.
- Rfranca7 years agoResolver IV
Ashish_Mathur
thank you... but....the TOPN function in DAX the N_Value parameter does not work when the value comes from a measure, only accepts value typed.
I want to use a dynamic value for this parameter that comes from a SLICER.How to make it happen?
- Ashish_Mathur7 years agoSuper User
Hi,
The N value in the TOPN() function can be the result of a measure. Create a Table with 5 values (from 1 to 5). Name that as Rank_values. Create a slicer visual and drag the Values field from the Rank_values Table. Select anyone value there. Write this measure
Selected Top N = MIN(Rank_values[Value])
In your RANKX formula, the first inout should be [Selected Top N]
Hope this helps.
- Rfranca7 years agoResolver IV
Hi, Ashish_Mathur
Help me....
I need to paint a chart only with the items selected in the RANK.
For this I put together a list and if it is in the list it paints the chart.https://1drv.ms/u/s!AjVxNwZurzV3g3tOY08NA7cMl7yC
Tks