Thanks for the response Sunny.
What kind of expression do you think can be written?
I basically want the similar thing which is done in Colors tab in QlikView where I can assign different color to each expression.
"Properties --> custom colors and legend --> select by Expression from drop down-->
There you can write your own expression"
Nothing strikes my mind.