Forum Discussion
RANKX Power BI - Repeating
- 4 years ago
Hi Lucas:
Here are two measures that can work for one column and second one considering two columns from the same table: I will picture the table below. One or both of these should work. My table named used is 'TableRank'. I hope this provides your solution!
Rank EQ = RANK.EQ(TableRank[Stock],TableRank[Stock],DESC)Part RankX = RANKX(FILTER(all(TableRank),TableRank[Store]=EARLIER(TableRank[Store])),TableRank[Stock])
Hi:
Can you try using a pattern such as: (Here is an example for ranking customers by net sales). Where Sales_Data is the Fact Table and Customers is Dimension table and Customers[Serach Name] is being ranked for net sales. I can't see your other tables,so I hope this helps!
Rank_Cust by Region =
IF([Net Sales] > 0,
RANKX(
CALCULATETABLE(
SUMMARIZE(Sales_Data,
Customers[Search Name]),
ALL(Customers[Search Name])
),
[Net Sales],
,
DESC
))
I tried to do something like you did, but i stil getting the same result, in my case, both columns that i whant to analize are in the same table, is it supose to work difrently?
- Whitewater1004 years ago
Solution Sage
Hi Lucas:
Here are two measures that can work for one column and second one considering two columns from the same table: I will picture the table below. One or both of these should work. My table named used is 'TableRank'. I hope this provides your solution!
Rank EQ = RANK.EQ(TableRank[Stock],TableRank[Stock],DESC)Part RankX = RANKX(FILTER(all(TableRank),TableRank[Store]=EARLIER(TableRank[Store])),TableRank[Stock])