March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
The data table used is below
I have a slicer nValue, with values from 1 to 20.
Case 1 (working as expected):
Based on the slicer selection, the data table should show the top products based on Index values.
Measures used:
1. TotalSales = SUM('Table'[Amount])
Case 2 (Not working):
Based on the slicer selection, the data table should sort the Products based on the top N random values.
However, the results don't come as expected.
Solved! Go to Solution.
Hi, @Anonymous
Measure Random and Measure Top_Random perform different random number calculations. The random number generated by Measure op_Random is not the same as the random number generated by Measure Random.
And due to the characteristics of the TOPN function, the returned result may be more than N rows.
If there is a tie, in order_by values, at the N-th row of the table, then all tied rows are returned. Then, when there are ties at the N-th row the function might return more than n rows.
You can read these articles below for more information
Refer:
Filtering the Top 3 products for each category in Power BI
Filtering the top products alongside the other products in Power BI
Showing the top 5 products and Other row
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Measure Random and Measure Top_Random perform different random number calculations. The random number generated by Measure op_Random is not the same as the random number generated by Measure Random.
And due to the characteristics of the TOPN function, the returned result may be more than N rows.
If there is a tie, in order_by values, at the N-th row of the table, then all tied rows are returned. Then, when there are ties at the N-th row the function might return more than n rows.
You can read these articles below for more information
Refer:
Filtering the Top 3 products for each category in Power BI
Filtering the top products alongside the other products in Power BI
Showing the top 5 products and Other row
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |