3 Replies Latest reply on Jun 19, 2018 3:12 PM by Hari Ankem

# How to calculate Last Year-1 Quarter on Quarter

Hi All,

I have been building dashboard with Profit data, QoQ, Last year QoQ.

I want to create a calculation on Last Year-1 QoQ.

I want to add a third line, to compute : (2018 Q3)/(2016 Q3)-1, which is Last Y-1 QoQ.

I don't know how to do it by Add quick Table Calculation:

This is just for Last Year QoQ:

eg: (2018 Q1)/(2017 Q1) -1 ; (2017 Q1)/(2016 Q1) -1

(ZN(SUM([Profit])) - LOOKUP(ZN(SUM([Profit])), -1)) / ABS(LOOKUP(ZN(SUM([Profit])), -1))

Now I want to use:  (2018 Q1)/(2016 Q1) -1 ; (2017 Q1)/(2015 Q1) -1 ; (2016 Q1)/(2014 Q1)-1 --- as I don't have 2014.

Thanks and best regards,

Helen

• ###### 1. Re: How to calculate Last Year-1 Quarter on Quarter

Is this the expected output?

1 of 1 people found this helpful
• ###### 2. Re: How to calculate Last Year-1 Quarter on Quarter

Hari! You are a genius! Thank you!

Did you do this by coding or just add the calculation?

I have also noted a question:

When I want to add QoQ for Profit and Sales seperately, it seems that I need to name the QoQ for Profit : "QoQ for Profit" and the QoQ for Sales " QoQ for sales" .

Can I expect that I simply code for one QoQ and it is used for everything?

Thanks and best regards,

Helen Wang

• ###### 3. Re: How to calculate Last Year-1 Quarter on Quarter

I duplicated the earlier calculated field, and changed the 1 to 2. Did not code it explicitly.

You cannot have a single QoQ and use it for everything. Profit and Sales are different measures, and when you do table calculations, you are doing it for each of the measures separately.

Alternatively, you can have a single QoQ, but will need a parameter to identify whether the computation should be based on Profit or Sales.

1 of 1 people found this helpful