Forum Discussion
Power bi top n filter
Hi community,
I am new to power bi. I want to use top n filter to just give me too 5 rows. I don't need any basis or anything. This is just to limit the number of rows to fetch. Any parameter with which it is fastest to load.
I don't have any unique column and if I try date column I'll get 1000 of records Instead. Any solution?
The default window is 501 rows. If your query times out or you have more than 1 million distinct values then you would have to ask the capacity admin to raise the limit. Or - rethink your setup.
7 Replies
- MNedix
Solution Sage
Heya,
It seems to me you just want 5 random rows from your data sample and I also understand/assume you don't want to add an Index column.
If this is the case, you can use the SAMPLE function as below (it will return a table with 5 random rows from your table Table:
Sample table = SAMPLE(5,'Table',1)If this solved your problem then please mark it as the solution so others can see it.
Best,
- lbendlin
Super User
The default window is 501 rows. If your query times out or you have more than 1 million distinct values then you would have to ask the capacity admin to raise the limit. Or - rethink your setup.
- lbendlin
Super User
Import mode or Direct Query?
You can create your own table copy (as a calculated table)
Table2 = TOPN(5,Table1)
- Learner82New Member
I am using direct query.But then I am not able to filter from the entire data . It filters from top 5 only
- HarshSathwara19
Helper I
This might be helpful to you https://www.youtube.com/watch?v=yGFcCbXn_g0
TopN - https://dax.guide/topn/