Hi this is really useful, also I have one query on calculating static averages: such as last 6 months or first three months average. I have a date and amount and if I have to calculate the average for months from Jan to Jun , how will I do that ? The limitations that I see in SAS VA is date column cannot be called in parameter and I cannot freeze the dates So I want to give user either a flexibility to choose a date and then based on date it should calculate 6 months average. Or if I have cross tab then for selected year it should give me average for 6, or last 3 or previous to last three. Help me if you have dealt with this before!!!!