The "Market.Product" is not working in the expression. It gave me no values. I couldn't understand exactly how is this expression working though.
Later I found a solution for this scenario in another discussion Ranking in case of tie breaker with respect to other metrics which worked perfectly for me.
Here they used the below expression for ranking the products,
Thank you for replying !