Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Announcements

The way to achieve your own success is the willingness to help somebody else. Go for it!

- Qlik Community
- :
- Forums
- :
- Analytics
- :
- New to Qlik Sense
- :
- Year Over Year Growth Calculation

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

mpalha

Contributor III

2021-01-23
11:59 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Year Over Year Growth Calculation

Hello,

I am having difficulty trying to calculate YOY growth for my average and penetration metrics, for example, average sales. The Sales, Units, Sales PY, Units PY, Avg. Sales, and Avg. Sales PY calculate fine. The formula for them are below:

Sales = Sum(sales)

Units = Sum(units)

Sales PY = Sum({<Year={$(=only(Year)-1)}>}sales)

Units PY = Sum({<Year={$(=only(Year)-1)}>}units)

Avg. Sales = Sum(sales) / Sum(units)

Avg. Sales PY = Sum({<Year={$(=only(Year)-1)}>}sales) / Sum({<Year={$(=only(Year)-1)}>}units)

However, my Avg. Sales Growth formula does not work as expected. The formula is below:

Avg. Sales Growth = ((Sum(sales)/Sum(units)) -

(Sum({<Year={$(=only(Year)-1)}>}sales) / Sum({<Year={$(=only(Year)-1)}>}units))) /

(Sum({<Year={$(=only(Year)-1)}>}sales) / Sum({<Year={$(=only(Year)-1)}>}units))

If Avg. Sales for the current year is $3.80 and Avg. Sales PY is $3.41, Avg. Sales Growth is being calculated as 11.6%. But it should be 11.4%... how is this happening and how do I resolve? Thanks!

2,174 Views

3 Replies

2021-01-23
01:39 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Only(Year) is something not working in your case due to there is nothing aggregate to your field where you compare. Perhaps this may will give hint

**((Sum(sales)/Sum(units)) -****(Sum({<Year={$(=Max(Year-1))}>}sales) / Sum({<Year={$(=Max(Year-1))}>}units))) /****(Sum({<Year={$(=Max(Year-1))}>}sales) / Sum({<Year={$(=Max(Year-1))}>}units))**

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Ksrinivasan

Specialist

2021-01-24
10:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

hi,

try this

((Sum({<Year={$(=only(Year)-1)}>}sales) / Sum({<Year={$(=only(Year)-1)}>}units)/Sum({<Year={$(=only(Year))}>}sales) / Sum({<Year={$(=only(Year))}>}units))*100)-100.

ksrinivasan

mpalha

Contributor III

2021-02-03
08:57 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi everyone,

Just an update to this that the rounding of dollar and percent value is what is causing the discrepancy. If the full number is used in the YOY calculation, it is correct.

2,080 Views