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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pbiforum123
Post Patron
Post Patron

Bottom N DAX help

Using below DAX we are getting Top 1 Item

 

Measure 1 =
var top1Brand = CALCULATE(TOPN(1,ALLSELECTED(Item[Item]),[Summary],DESC))
return
top1Item

 

To get the Bottom 1 Item , we using below but we are getting below error. Please kindly help, it is very urgent

 

Measure 2 =
var Bottom1Item = CALCULATE(TOPN(1,ALLSELECTED(Item[Item]),[Summary],ASC))
return
Bottom1Item 

 

Error:

A table of multiple values was supplied where a single value was expected.

2 REPLIES 2
amitchandak
Super User
Super User

@pbiforum123 , You need to try TOPN like, assuming Summary is a measure

 

calculate([Summary], TOPN(2, allselected('Item'Item]), [Summary],desc), values('Item'[Item]))

 

TOPN: https://youtu.be/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

@amitchandak Thanks!

Yes Summary is a measure but this is not getting me expected result. The dax which I have shared gives me item name which has top sales value what I need is I want a DAX which can return the item which has least sales. Hope you got my requirement. Please let me know if you have any questions.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors