Forum Discussion
SteveCampbell
Memorable Member
7 years agoFilter based on rank
For some reason can't work this out I have a table with products 1,2,3,4,5,6 I can filter on any combination I have another table with selected product, based on rank of the product ID I...
- 7 years ago
Hi SteveCampbell,
Can you share a sample and the expected result? Especially the data structure. Please check out the demo in the attachment.
Measure = VAR whichOne = SELECTEDVALUE ( selectedProducts[Selected] ) RETURN MAXX ( FILTER ( SUMMARIZE ( 'Products', Products[ProductName], "ranks", RANKX ( ALLSELECTED ( 'Products' ), CALCULATE ( SUM ( Products[ProductID] ) ), , ASC ) ), [ranks] = whichOne ), [ProductName] )Best Regards,
Dale
SteveCampbell
Memorable Member
7 years agoMeasure =
var _selected_product = FIRSTNONBLANK('Product Spot'[ProductSpot],99)
var _invent_prod_rank = CALCULATE(RANKX(ALLSELECTED(prods),FIRSTNONBLANK(prods[prod item],1),,ASC))
var _selected_item_table =
FILTER(ADDCOLUMNS(VALUES(prods[prod item]) "AA", _invent_prod_rank )
,[AA]=_selected_product)was where I was going, which works but only with prod item row context