Forum Discussion
Use RANKX with column ID or column not calculated
Anonymous , The information you have provided is not making the problem clear to me. Can you please explain with an example.
With Column ID you can use column Rank that will not be dynamic
Rankx(all(Table), [column ID],,asc)
You need to have this with some measure
rankx(all(Table[column id]), calculate(countrows(Table)))
You can filter visual on <=10
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
Appreciate your Kudos.
- Anonymous5 years agoNot applicable
I would simply like to display the first 10 rows of this table
- amitchandak5 years agoSuper User
Anonymous , Top 10 based on any measure would be like this
Top 10 Rank = CALCULATE(calculate(countrows(Table)),TOPN(10,all(Table[id]),calculate(countrows(Table)),DESC),VALUES(Table[Id]))
Else top 10 based just ID column rank, you have a filter at the visual level
Rankx(all(Table), [ID],,asc)
Here we need the basis of top 10 filter
- Anonymous5 years agoNot applicable
amitchandakI used the first formula as you indicated to me, but it still shows me all the lines
at first, I created a measure like this :
IDN3 = CALCULATE(CALCULATE(COUNTROWS(Tracking)),TOPN(10,FILTER( Tracking, Tracking[IsInPeriode] = 1 &&Tracking[glpi_dropdown_tracking_category.name] = "Incidents" && Tracking[priority] = 4) ,calculate(countrows(Tracking)),DESC),VALUES(Tracking[Id]))
ana i had this result :