2 Replies Latest reply on Sep 3, 2016 4:33 PM by Daniel Santamaria Ots

# Running total formula (cumulative quarters for a specific year) question

Hi everyone,

I'm trying to build a formula that show the Year-to-date (cumulative quantity of a specific calendar year) of the Profit Before Taxes of a selected Bank, for a specific quarter of a chosen year. Let me first show a screenshot of my excel:

The AR column shows the quarterly data of the Profit Before Taxes Variable

The DB column shows the quarters of the Year

The DC column shows the specific year

The DF shows the specific bank I'm analyzing The idea would consist on building a formula based on the following logic (for a specific bank on a specific year):

Profit Before Taxes Year-to-date (YTD) formula: Prof. Q1=q1; Q2=q1+q2; Q3=q1+q2+q3; Q4=q1+q2+q3+q4 (for each year)

Let me show you a screenshot for you to have a better idea of the dashboard display: I' would really appreciate any help you may provide me.

Thank you everyone,

Best,

Dani

PS: I'm using Tableau Public v.10 (last version)

• ###### 1. Re: Running total formula (cumulative quarters for a specific year) question

Hi Daniel,

Please find the attached v10 workbook as an example.

The main calculation is a Quick Table Calculation (YTD Total).

Essentially it is a RUNNING_SUM() over Date / Datetime field

at the view granularity (Year-Quarter in this case) starting over each Year.

Another necessary ingredient (as per your Date filter requirement)

is a Table Calculation Filter (actually, two of them -- for Years and Quarters)

in a form of LOOKUP( MIN([Date]), 0 ). It is computed along Cell, which means that

the filter effectively hides marks on a view, leaving YTD Table Calculations intact.

Yours,

Yuri

1 of 1 people found this helpful
• ###### 2. Re: Running total formula (cumulative quarters for a specific year) question

Thank you Yuri!

Best,

Dani