4 Replies Latest reply on Sep 8, 2019 12:44 PM by Yeyner Escobar

# TABLEAU PREP: Show percentage of each segment

Hello tableau community; I am trying to materialize in my data the percentage value of each segment,

I have created 3 calculated fields to separate the segments, I did it this way, I don't know if there will be another better way:

The calculation is as follows:

I have also grouped the segment field and placed the value of 1, this to show a 1 for each record

This is where I want to show a new calculation that shows me the percentage value of each row with respect to the total:

`I think I need to know the total value of the segment, a formula to apply it in a calculation, could be:I don't know how to do this calculation in tableau prep`
`I appreciate the help you can give me!!`
`I attach the workflow of tableau prep 2019.2.3`
• ###### 1. Re: TABLEAU PREP: Show percentage of each segment

I think section 3 does what you are trying to do.

Also, out of curiosity, any particular reason you want to this in prep? Percentage of the total is a simple table calculation in Tableau itself.

Subodh.

1 of 1 people found this helpful
• ###### 2. Re: TABLEAU PREP: Show percentage of each segment

Thanks Subodh Gupta , I know it seems strange that I want to perform this calculation in the data source, but in the end I will use that value in percentage in multiple calculations and there comes a time when I can no longer combine LOD and quick table calculations.

`I will check the link`

1 of 1 people found this helpful
• ###### 3. Re: TABLEAU PREP: Show percentage of each segment

Yeyner Escobar wrote:

there comes a time when I can no longer combine LOD and quick table calculations.

I think, I have been in that place

• ###### 4. Re: TABLEAU PREP: Show percentage of each segment

It is the reason why I am materializing these initial calculations from the data source.

The article is very good, in one part it says:

## Now how do I use it?

Now that you’ve built out your LOD expression, you can use it in a variety of ways:

1. Share it with others:
2. Use it as a base for other calculations: (This is my case)
1 of 1 people found this helpful