Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have a very basic table with a column latency. The latency stores the time it takes to execute in milliseconds.
I would like to see the top 20 records w.r.t the latency column in ascending order. Can anyone help me with the DAX query? I used the following one but the ordering is incorrect.
EVALUATE
TOPN (
20,
FILTER (
Fact_APIData_Weekly,
Fact_APIData_Weekly[ExecutionDate]
= DATE ( 2022, 4, 23 )
),
Fact_APIData_Weekly[Latency], TRUE
)
Solved! Go to Solution.
@subhendude , Try like, what is the issue you are getting
TOPN (
20,
FILTER (
Fact_APIData_Weekly,
Fact_APIData_Weekly[ExecutionDate]
= DATE ( 2022, 4, 23 )
),
Fact_APIData_Weekly[Latency], desc
)
Hi @subhendude ,
As far as I know, there is no reliable way. You could click the filter drop down arrow on the column and select Sort.
Best Regards,
Jay
The data is not getting sorted. The backend data is stored in Azure Data Explorer and I've used Power Query to prepare the data model. There is a date dimension table and fact table with latency numbers. I joined both the tables with the date column(one to many relationship)
Then I connect the PBI model with DAX studio and used the above DAX query. Unfortunately it gave me 20 records but not sorted by latency number.
@subhendude , Try like, what is the issue you are getting
TOPN (
20,
FILTER (
Fact_APIData_Weekly,
Fact_APIData_Weekly[ExecutionDate]
= DATE ( 2022, 4, 23 )
),
Fact_APIData_Weekly[Latency], desc
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.