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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pbiforum123
Post Patron
Post Patron

Bottom N

I am using the below DAX to get the Top value, I don't see any function called BOTTOMN to get the last value and also in the below DAX if I use ASC instead then also it is not worrking. Please help me to get the Bottom N.

 

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

 

Above DAX gives the brand which ranks 1 but what i need brand which ranks last.

 

Please let me know if you have any questions.

6 REPLIES 6
pbiforum123
Post Patron
Post Patron

Hi All,

Any update from anyone on this?

pbiforum123
Post Patron
Post Patron

any update from anyone else on this?

VijayP
Super User
Super User

@pbiforum123 

That is my measure which to be filtered by top and bottom values




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


VijayP
Super User
Super User

@pbiforum123 

if you use ASC , it should work it works for me, try again.

My formula:

Bottom N Branches =
CALCULATE([Selected Item],
TOPN(5,
ALL(Branch[Branch]),[Total Profit],ASC),
DISTINCT(Branch[Branch]))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP If Selected Item is a measure then what is Total Profit?

@VijayP ok thanks will check and let you know... [Selected Item]??? What is this? I did not understand that to replicate in my pbix.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.