Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

top n

hi
i am trying to display top 1 place name from place table.
i tried using this formula didnt work

top = TOPN (1,Place,Place[place_name],DESC)
 

greeshma_0-1620641768248.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

What you are creating is a measure or calculate column, right? Actually, it will return a table with the top N rows of Place table when  you use TOPN function. You can refer the content in the following threads to get the top 1 place name.

Dax Top 1 Name

Display Top 1 customer on Card Visual

If the above ones are not applicable for your scenario, please provide some sample data in Place table (exclude sensitive data) and your expected result with example and backend logic. Thank you.

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

What you are creating is a measure or calculate column, right? Actually, it will return a table with the top N rows of Place table when  you use TOPN function. You can refer the content in the following threads to get the top 1 place name.

Dax Top 1 Name

Display Top 1 customer on Card Visual

If the above ones are not applicable for your scenario, please provide some sample data in Place table (exclude sensitive data) and your expected result with example and backend logic. Thank you.

Best Regards

Anonymous
Not applicable

You can't return a whole row from a table into a measure/column. You have to return a scalar value.

amitchandak
Super User
Super User

@Anonymous , this return table not measure

 

example of usages

Top N = CALCULATE([measure],TOPN(10,all(sheet1[Business_Process_Type]),[measure],DESC),VALUES(sheet1[Business_Process_Type]))

 

Refer I have discussed this case in my video

https://www.youtube.com/watch?v=QIVEFp-QiOk

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.