11 Replies Latest reply on Oct 22, 2018 8:16 AM by Hari Ankem

# How to calculate QoQ in Table Calculation

Hi All,

My question is:

I want to calculate QoQ with a formula like this: QoQ 2018 Q1 = 2018Q1/2017Q1 - 1

Basically, it is used this year quarter compared against previous year quarter.

Currently my selection in Table Calculation is not working.

I cannot share the dataset but I would really love some ideas or advice.

• ###### 1. Re: How to calculate QoQ in Table Calculation

2 of 2 people found this helpful
• ###### 2. Re: How to calculate QoQ in Table Calculation

Thank you so much!

I have a follow up question on how to color them:

I have tried to use the color method you taught me before but I do not know how to index two metrcis in one measure:

if [QoQ%]>0.8 or [QoQ%]< -0.8 then 'Red'

elseif [QoQ%]>0.2 or [QoQ%]< -0.2  then 'Purple'

else "Blue"

END

I have two QoQ now.

• ###### 3. Re: How to calculate QoQ in Table Calculation

When you state you have 2 QoQs, do you mean the way you are using it above, or 2 different QoQs altogether? If it's the same variable being used twice, what you have written above is correct and should be used the same way.

1 of 1 people found this helpful
• ###### 4. Re: How to calculate QoQ in Table Calculation

The way I am using it above:

I have one QoQ (compared against the previous quarter) on the second line

and another QoQ (compared against the one in previous year) on the third line.

It is different QoQ (different table calculation). But I want to create a color measure to color those above >80% red.

Thanks,

Helen

• ###### 5. Re: How to calculate QoQ in Table Calculation

OK. What you should first do in this case is that you need to have different names for the different calculations. So, you should first drag the calculation from the Measure Values to the Measures section. This will enable you to give a name for the calculated field. Repeat for the second method of calculation too. In the image below, the 2 calculated fields for me now are "QoQ" and "QoQ (YoY)". You should be able to see them in the Measures section on the left. I am then using it in the color calculation as shown below.

1 of 1 people found this helpful
• ###### 6. Re: How to calculate QoQ in Table Calculation

HI Hari,

Thanks!

• ###### 7. Re: How to calculate QoQ in Table Calculation

1 of 1 people found this helpful

• ###### 9. Re: How to calculate QoQ in Table Calculation

Thanks,

Helen

• ###### 10. Re: How to calculate QoQ in Table Calculation

Hi Hari

I need to create a dashboard which has data for 2 weeks (it is rolling 2 weeks; previous week and current week) and KPIs as measures. I need to show Delta between 2 weeks. There is a filter for week, means user can select week 1 and week 3 and see the delta. By default it will current week and previous week.

There will be a filter for KPI too.