5 Replies Latest reply on Aug 2, 2018 7:49 AM by David Maning

# Calculation of growth rate

Hi,

I need to compare (data till this week) - (data till last week) to calculate growth rate. How can I create this in a calculated field.

I tried below one but it is giving total total value only.

If date= max(date)-7 then countd(gui) end.

Where am I wrong?

The graph should show data till date.. growth rate should be as a label only.

• ###### 1. Re: Calculation of growth rate

Hi Priyanka,

Would try a table calculation set as the running total, and then create a secondary calculation on this and set this as percentage difference.

See the screenshot below.

Best

David

• ###### 2. Re: Calculation of growth rate

Hey David,

Thanks for your response. Your reply isn't clear for me.. Can you explain it a little deeper or send me a scrrenshot again. As the one you shared is not cleared.

• ###### 3. Re: Calculation of growth rate

Sure apologies,

If you would like to get the difference between to values, one can use a Table Calculation.

From what you have described I feel that you want to get a running total of all your data, as you mentioned  'data until last week'.

To do this right click on the value you went to get the running total, go to add table calculation and chose running total.  You will now get a cumulative value for your data.

Now that you want to get a percentage difference between the 2 weeks you will need to right-click on this value again, click edit table calculation. There is an option t chose a secondary option.  Click that and a new menu will open.  Here click Percentage difference.

See the screenshot below, the should give you some direction what how to configure.

If you like send me a sample of the workbook, this might help at bit more.

Best David

• ###### 4. Re: Calculation of growth rate

Try this to get data till last week:

countd(If date <={max(date)}-7 then gui end.)

• ###### 5. Re: Calculation of growth rate

Hi,

{SUM(IF DATETRUNC('week', [Order Date]) < DATEADD('week', -1, {MAX(DATETRUNC('week', [Order Date]))})

THEN [Sales]

END)}

-

{SUM(IF DATETRUNC('week', [Order Date]) < DATEADD('week', -2, {MAX(DATETRUNC('week', [Order Date]))})

THEN [Sales]

END)}

Updated worksheet is in the attachment.

Trust this helps.

D