Your requirement is unclear. I suggest that you specify whether this is a load script or front end issue, what data you have and what output you would like from the data you have. The best option is to upload a sample qvw containing some example information and a clear specification of what results you would like.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein