forums
Use these forums to ask questions and discuss Tableau.
Calculating a field based on a percentage
Posted August 1st, 2008 by IanA
in Calculations
Hi,
I'm fairly new to tableau (getting familiar with the basics).
I want to create a new field based on the percentage of another field, if that makes sense.
eg:
( sales of a product / total sales ) * x
Many Thanks
Comments
If you have, for example, records for each product containing sales in multiple areas as well as a sales total, you could make something like this:
([Pacific Sales] + [Mountain Sales]) / [Total Sales]
Right click on the data pane and select "Create Calculated Field" to enter and name your formula.
If the [total sales] you're talking about is not a data point of each record but the aggregate sum of the sales of all your records, then you can use a "Percent of Total" Table Calculation on your [sales of a product] measure. You might also want to display Grand Totals, from the Table menu.
Does that help?
cheers for that, i did bodge it just by manually typing the values
But it is nice to be tidy
Thanks for your help