7 Replies Latest reply on May 2, 2013 1:25 PM by Tracy Rodgers

# How do I create a calculation based on multiple parameters in Tableau public?

This is probably a simple calculation, but my knowledge of syntax is limited.

I'm working with housing price index data and want to set up a function for users to input a date and value and see how that value changed over time.

The data is structured like so:

 Region Year Quarter Index OR 2012 1 243.81 OR 2012 2 257.49 OR 2012 3 267.38 OR 2012 4 264.88 PA 1991 1 100.00 PA 1991 2 100.03 PA 1991 3 100.37 PA 1991 4 101.40 PA 1992 1 101.78 PA 1992 2 102.35 PA 1992 3 102.50 PA 1992 4 102.96

Users would input parameters for state, start point and end point (year and quarter), and start value. The formula would divide the end point index by the start point index and multiply the quotient by the value (INDEX2/INDEX1)*VALUE.

Mostly what I need help with is a formula that returns the index value based on location, year and quarter. Advice much appreciated.

• ###### 1. Re: How do I create a calculation based on multiple parameters in Tableau public?

Hi Chris,

I have attached a sample workbook using the above data. The calculation will just need to be edited to then multiply the value--just add *sum(Value).

Hope this helps!

-Tracy

• ###### 2. Re: How do I create a calculation based on multiple parameters in Tableau public?

Thanks, Tracy.

Unfortunately I can't open the attached workbook. I get a message that "the requested workbook does not exist on Tableau Public." The problem may be on my end, but I can't seem to get around it.

Chris

• ###### 3. Re: How do I create a calculation based on multiple parameters in Tableau public?

Oops sorry! I didn't take an extract--here you go.

• ###### 4. Re: How do I create a calculation based on multiple parameters in Tableau public?

Hmm. Still getting the same error message.

• ###### 6. Re: How do I create a calculation based on multiple parameters in Tableau public?

Thank you so much!

Though I don't entirely understand how it works, it does. I even managed to add a formula that calculates the value back in time.

My one issue now is with the display (see attached workbook). It's showing both the start and end dates with the end value in each row. I'd like to have it show the initial value at the start date - or just hide that field altogether. Any suggestions?

Also, I'd appreciate any suggestions of where I might go to learn more about the syntax of formulas. I haven't found anything basic enough on the forums, so I end up having to ask for help each time I hit a roadblock.

Thanks, again.

Chris

• ###### 7. Re: How do I create a calculation based on multiple parameters in Tableau public?

Hi Chris,

One way you can do this is to create a calculated field similar to the following:

first() + 1

Right click on this calculation and select Convert to Discrete. Then, place the calculation on the rows shelf. Right click on the 0 that results and select Hide. Then, click on the calculation again and un-check Show Header.

In terms of the calculation syntax, it just takes practice and the forums are a great place to find similar equations. There is also the The specified item was not found.--although this is just getting underway.

Hope this helps!

-Tracy

1 of 1 people found this helpful