Forum Discussion
pbiforum123
3 years agoPost 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 bu...
amitchandak
3 years agoSuper 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]))
- pbiforum1233 years agoPost Patron
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.