问题
I am trying to create a measure in powerpivot which should give me the ten lowest prices per article – and then put that measure in a pivottable to see the customer's name behind that price.
But I realized there is no such thing in powerpivot then SMALL() as Excel does. Am Did I miss this function in powerpivot or do I need to solve it some other way?
回答1:
The RANKX
function is what you are probably looking for: MSDN documentation
This allows you to create a ranking for a table based upon an expression. By specifying the order Parameter as 1 you would get a smallest-to-highest ranking which would be aquivalent to SMALL()
Alternatively you could use RANK.EQ
to create a calculated column on your table which would contain the ranking. You could then use the Top 10 filter in a Pivot table to get your desired result: MSDN documentation
来源:https://stackoverflow.com/questions/45284253/small-function-in-powerpivot