Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Summarize table with 10 records for each category without having the arthematic expressions columns.
The records from the single table having 1Lac rows and its should display 10 records for each category in the table visual.
Please can someone help with the DAX logic to implement
@dax
My apologies.
Can't take credit for this.
Thought I knew how to do this, but had to learn from @v-yueyunzh-msft .
Step 1) Create a calculated column which provides a truly unique ID. Part of the problem is that your table currently has no unique ID, and therefore, no way to break ties to get an exact number of records (e.g. 5) for each group (e.g. City). You can create the unique ID any way you like, but this is what I did.
Step 2) Create a measure that ranks the Unique ID from 1 to N, separately for each group (in this case, for each City group).
Step 3) Filter the table visual by the newly created measure & specify where:
[Rank Unique ID for each City] is less than 6.
The table visual now returns only 5 records for each City.
Does this solution work for you?
Or does it need to be truly random? (meaning, do the records returned need to change every time the report is generated?)
Regards,
Nathan
https://drive.google.com/file/d/11wUFZyZCYaTHMVLRceXALSQqrxOyPCTu/view?usp=sharing
Attached is the sample mock data and trying to get the solution
Need to Summarize the data in table visual for each city with only 5 random records data.
I'm not following you very well.
Would it be possible to provide a sample screenshot of the data you are starting with, as well as a screenshot of the desired result (e.g. Excel mock-up)?
1) Do you mean that the table you want to summarize already has 10 records for each category? Or are you saying that it has more, but you want the result to summarize the top 10 records for each category?
2) What do you mean "without having the arithmetic expressions columns"?
3) What do you mean "records from the single table having 1Lac rows..."?
- What do you mean by "single table"?
- What do you mean by "having 1Lac rows"? What does 1Lac mean?
Regards,
Nathan
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |