4 Replies Latest reply: Oct 14, 2014 5:02 AM by Ashwani Kumar

# Function to get all of 1 dimension

I need to be able to create an expression that would give revenue by area for group 1 divided by the revenue of by area for ALL groups. I have tried different ways (using TOTAL) but can't get it to do what I am looking for...

 Group Area Revenue 1 North \$   1,000.00 1 South \$   2,000.00 1 East \$   3,000.00 1 West \$   4,000.00

Note: I need to be able to filter on Group 1 in this example.

• ###### Re: Function to get all of 1 dimension

Hi!

Take a look on the attached file. Is that what you're looking for?

I did a sum(TOTAL <Group> Revenue). This make a group by in your sum by "Group".

Regards,

Gabriel

• ###### Re: Function to get all of 1 dimension

sum(Revenue) / sum(total <Group> Revenue)

or   sum(Revenue) / sum(total <Area> Revenue)

• ###### Re: Function to get all of 1 dimension

Hi,

one example:

```//creation of sample data
tabRevenue:
Pick(Mod(RecNo()-1,4)+1,'North','South','East','West') as Area,
Money(Round(Rand()*4000,0.01)) as Revenue
AutoGenerate 16;
```

hope this helps also

regards

Marco

• ###### Re: Function to get all of 1 dimension

Hi,

Please go through the below qvw. It will provide you the result,which you required.