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.
Data set (Table name - Table1) has the insurance complaints inforamtion. I am trying to get the top 10 days where maximum complaints have been filed.
Below is the DAX query result. Its not sorted correctly. Can anyone tell what going wrong?
Solved! Go to Solution.
TOPN does not guarantee any sort order for the results.
If you're writing a DAX query, you can add and ORDER BY clause at the end. For example,
EVALUATE
TOPN (
10,
SUMMARIZECOLUMNS (
Table1[Received date],
"Complaint Count", COUNTROWS ( Table1 )
),
[Complaint Count], DESC
)
ORDER BY [Complaint Count] DESC
TOPN does not guarantee any sort order for the results.
If you're writing a DAX query, you can add and ORDER BY clause at the end. For example,
EVALUATE
TOPN (
10,
SUMMARIZECOLUMNS (
Table1[Received date],
"Complaint Count", COUNTROWS ( Table1 )
),
[Complaint Count], DESC
)
ORDER BY [Complaint Count] DESC
That worked. Thanks.
If I need to show this in report view, how do I do that?
Then you probably don't need any DAX. Just put the columns in a table visual, add a TopN filter in the filter pane, and sort by whichever one you want.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
21 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |