2 Replies Latest reply on Dec 2, 2016 12:25 AM by Fabio Guimaraes

# How can I create this formula: (40%*Variable1 + 30%*Variable2 + 30%Variable3)

Hi there!

I have 3 calculated fields but one is a "Quick Table Calculation".

I want to create a new calculated field using a percentage of every variable.

I came up with something like this, but didn't work:

(40%* SUM([FixedAVGHourSession]) + 30% SUM([FixedAVGDayofWeekHourSession]) + 30% WINDOW_AVG(SUM([Sessions]), -7, -1))

I appreciate any help here

• ###### 1. Re: How can I create this formula: (40%*Variable1 + 30%*Variable2 + 30%Variable3)

Out of interest what result did you get when you say it didn't work?

Your formula seems ok, although the brackets clearly aren't correct and instead of '40% *' it should be '0.4 *'

For example, using your formula above, perhaps it should be:

(SUM([FixedAVGHourSession]) * 0.4) + (SUM([FixedAVGDayofWeekHourSession]) * 0.3) + (WINDOW_AVG(SUM([Sessions]), -7, -1) * 0.3)

I can't say for sure whether that will work as the table calculation may skew things, try it and see what happens. Please report back with any error messages you might get.

You could always slice these 3 separate calculations into 3 calculated fields and sum those 3 calculated fields as well.

2 of 2 people found this helpful
• ###### 2. Re: How can I create this formula: (40%*Variable1 + 30%*Variable2 + 30%Variable3)

Hey Andrew!

My bad, its working very well!