Forum Discussion

pbiforum123's avatar
pbiforum123
Post Patron
3 years ago

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

  • VijayP's avatar
    VijayP
    Community Champion

    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]))
    • pbiforum123's avatar
      pbiforum123
      Post Patron

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