I am trying to get the rank based on the category in powerbi , But not getting the result as expected.
You can do this by measure. Use ALLEXCEPT filter.