The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
13 | |
10 | |
10 | |
9 |