Forum Discussion

zndavies's avatar
zndavies
Regular Visitor
6 years ago
Solved

Rankx Across Look Up Tables

I'm trying to achieve a ranking accross look up tables. My 'Volume Ranking' formula seems to work great:

Volume Ranking = RANKX(ALLSELECTED('Product Info Table'[Product Info]),sumx(RELATEDTABLE('Sales Reports'),'Sales Reports'[Quantity]))
 
 

Until I bring in the 'Sub Group Description' field (each product is part of a subgroup):

I've tried to get around it using the following, but obviously it's not working:

 

Volume Ranking 2 = calculate(rankx(

ALLSELECTED('Product Info Table'[Product Info]),sumx(RELATEDTABLE('Sales Reports'),'Sales Reports'[Quantity]),,DESC),

ALL('Product Info Table'),

VALUES('Product Info Table'[Product Info]))

 

Here are the 2 relevant tables:

 

Can anybody tell me how to tweak my formula so that the ranking is iterated accrross the Product Info, regardless of the SubGroup?

2 Replies