2 Replies Latest reply on Jan 9, 2017 11:22 PM by Vandana Samtani

Calculation using Parameters

The requirement is that the user should be able to adjust the assumptions and calculate the new ranking column. Below is an example -

Theatre TH1 has the following Shows with ranking

Show ABC (1), Show DEF (2), Show GHI (3), Show JKL (4), Show MNO (5)

Let’s say we assume Show ABC had 2 shows (This is an assumption that user wants to change every week either for all theatres or selective theatres)

Next Step after the assumptions

For (Every Show inside Theatre TH1): The data set has a column called TrueCount.

If (TrueCount] > 1) Add a duplicate of that film after that film.

(If the True  Count for that show is greater than 1, add another copy of that show to the list right after the show)

Final Worksheet

There will be an additional column with the new ranking. New Column in the workbook

Show ABC (2), Show DEF (3), Show GHI (4), Show JKL (5), Show MNO (6)

Question

1. The user wants to change the assumption number every week. Can we provide users to select assumption value from a drop down The values will range from 1-10 OR
2. Can we give them a slider so that it updates the Ranking in a new calculated field?

It will really be helpful if i get some suggestions.

• 1. Re: Need your suggestion on this calculation

Hi Vandana,

Please refer the attached workbook. I have created a parameter "Assumption" and a calculated field "New Count". As the user changes the parameter value, the calculate field will  change the value. However, please note that we can only create new columns to the existing data in Tableau and can not insert a new row. ( Unless some smart kid or old fox comes with a hack!!). If you want to recalculate the ratings , you need to create a new calculated field for that.

Good Luck!!

Suhas

• 2. Re: Need your suggestion on this calculation

Hi Suhas,

Thanks for your help. The calculation you recommended will work.

Thanks again for your quick turn around.

Vandana