I have small table with Product Name and Amount. I am trying to create one rankx function which should ignore the filtered items from calculation. Data looks like below
My Ranks measure :Rank = rankx(ALL('Table'[Product]),CALCULATE(SUM('Table'[Amount])))
But here issue is whenever I put one slicer and un filter one product, rank will skip that product's rank and will show remaining procut's rank
I dont want skip one rank here .Instead it should be like serial number continous. My purpose is to show top N excluding few items with serial number or rank number .In order to exclude items either I will use slicer and filter panel
How to achieve this through measure
You just need to use ALLSELECTED()
:Rank = rankx(ALLSELECTED('Table'[Product]),CALCULATE(SUM('Table'[Amount])))