Forum Discussion
TOP N Visual with Parameter
Hi kaintxu2 ,
Based on the description, try using the following DAX formula.
Selected Measure = SWITCH( SELECTEDVALUE('Top N Parameter'[Parameter]), "Cantidad", [Cantidad], "Importe", [Importe Linea], BLANK() )
Then, using the following measure to filter the TOP N.
Rank Measure = RANKX( ALL('YourTableName'), [Selected Measure], , DESC )
If the provided expression doesn't work, can you provide simple example data?
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for the answer, I will try and provide some data. What is the best way to do so, just copy paste 2 examples from a table?
On the other hand, that Dax you mentioned on the second code, could you specify which is the table has to be the ranked one? If I chose the one with the original measures would not make sense right? As we are ranking grouped by Item type (Y Axis), and there is 2 different measures we want to use. I have tried usin the RANKX on the parameter table and it is not working
Thanks
- Anonymous1 year agoNot applicable
Hi kaintxu2 ,
Creating the TOPN measure. View the following DAX formula and modify the table and column name.
Besides, you can also view the following blog to learn more information.
Dynamic TopN made easy with What If Parameter - Microsoft Fabric Community
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.