9 Replies Latest reply on Sep 12, 2019 5:23 AM by kumar Su

# Calculate the percentage

I m new to Tableau !!

I have sample data below..

SId  Status Loaddate

---  -----  -----------------

10    Fail   09/08/2019

10    Fail   09/08/2019

10    pass   09/08/2019

11    Pass   09/08/2019

11    pass   09/09/2019

11    pass   09/09/2019

11    Fail   09/09/2019

I want the count of status values and need to calculate percentage of fail and pass by loaddate

I want to show the Daily,Weekly,Monthly,Yearly.trend report.

Thanks for your help in advance  !!!

• ###### 1. Re: Calculate the percentage

Hello kumar,

Here's a sample using table calculation (percent of total).

You can drill up and down by clicking  and

Regards

Lei

• ###### 2. Re: Calculate the percentage

Hi, Kumar

Have you tried this?

if it is weekly or monthly, just need to change the 'day' in the calculation to its related date part.

Hope this helps

ZZ

• ###### 3. Re: Calculate the percentage

Thanks Lei Chen and ZZ for the response..

Sorry for confusion here is the sample data..

 MachineID Division MachineStatus LoadDate 10 Sales Fail 9/8/2019 10 Sales Pass 9/8/2019 10 Sales Pass 9/9/2019 10 Mechanical Pass 9/8/2019 11 Mechanical Pass 9/9/2019 11 Mechanical Pass 9/9/2019 11 Mechanical Pass 9/9/2019 11 Mechanical Fail 9/9/2019 Except Output RunDate 9/8/2019 9/9/2019 Division Machine- Availability Machine-availability Sales 50% 100% Mechanical 100% 75%

Thanks for your help in advance !!

• ###### 4. Re: Calculate the percentage

Hi, Kumar!

See the attached example. I hope it helps!

• ###### 5. Re: Calculate the percentage

Thanks a Lot Taina Fernanda Carlos !!!

It worked perfectly !!!

However I want the the label RunDate to be displayed above division !!

 RunDate 9/8/2019 9/9/2019 Division Machine- Availability Machine-availability Sales 50% 100% Mechanical 100% 75%

Thanks a lot for your help in advance !!

• ###### 6. Re: Calculate the percentage

Hi, Kumar

I think  Lei's solution should work in your case.

anyway, see the calculation below

Sample workbook attached

Hope this helps

ZZ

• ###### 7. Re: Calculate the percentage

Thanks a ZZ for your help !!

your provided solution worked perfectly as well  !!!

However I want the label RunDate to be displayed above division !!

 RunDate 9/8/2019 9/9/2019 Division Machine- Availability Machine-availability Sales 50% 100% Mechanical 100% 75%

Thanks a lot for your help in advance !!

• ###### 8. Re: Calculate the percentage

Hi, Kumar

I don't think that is a possible thing in tableau, the best buy is to add dummy dimension on top of the date column as shown below

Let me know if this works for you or not.

ZZ

• ###### 9. Re: Calculate the percentage

Thanks a lot Zhouyi Zhang !!