You expression works when there is only one dimension for the pivot table. If there are multiple dimension it would not work. Also , it is based on the ranking of the total profit for each product rather then the profit within each country for each client
What I would like to have is that :
For example , Pivot table can show the most profitable client eg. Client A on the top and least profitable at the bottom.
Then it rank the most profitable country within Client A at the top and least profitable at the bottom.
The it rank the most profitable product at the top for each country and least profitable at the bottom
I have added expression in all dimension and it does not work.
Please provide your dataset and example and result or screenshot.
Like I said before , the ordering of product based on the ranking of the total profit for each product rather than the profit within each country for each client. That's why it end up with weird ordering for both product and country.
If I remove all dimension and keep product only, it works fine.