8 Replies Latest reply on Oct 2, 2013 1:27 PM by Gert-Jan Neeft

# Calculation sum up hours in rank

Hi,

Can anyone please help me with the following? It seems pretty easy but.....

I have 7 columns (days of the week) with a ranking of trucks (ranking by hours). In the Tableau workbook you see that each column has been summed up. That works. But I would like to get totals for every row. So I would like to sum up the hours (from monday to sunday) for every rank. Please take a look in the Excel file for the desired outcome.

I have tried a couple of things, but it seems that the calculation then goes haywire and I get different results then I see in Excel. So probably it is an 'advanced' calculation....?

Please see the attached Tableau workbook and Excel file.

If you have any questions, please don't hesitate to ask.

Best regards,

Gert-Jan

• ###### 1. Re: Calculation sum up hours in rank

Gert-Jan,

Take at look at this thread that will possibly be of help..

Cheers

Neil

1 of 1 people found this helpful
• ###### 2. Re: Calculation sum up hours in rank

Hi Neil,

I have the file opened and viewed, but can not reproduce in my sheet.

Can you possibly help me?

My English is not the best, but I hope you understand me.

Thank you!

Best regards

Gert-Jan Neeft

• ###### 3. Re: Re: Calculation sum up hours in rank

Ger-Jan,

Borrowed extensively from This idea from Joe Mako

Does this work for you?

Cheers

Neil

1 of 1 people found this helpful
• ###### 4. Re: Re: Re: Calculation sum up hours in rank

Hi Neil!

Thanks a lot for this post!

I've build the Custom SQL in my Tableau Workbook, see attachment.

In the sheet Rank per license you can see that the sum of the hours per day isn't the Total.

The difference with your sheet is the License Plate.

Can you or  Joe Mako help me reproduce the Excel file in Tableau??

Best regards

Gert-Jan

• ###### 5. Re: Calculation sum up hours in rank

How about the attached?

It is based on your original packaged workbook, so no custom SQL.

Also, in your Excel file:

Check out your SUMIF's in cell P2, it may not be performing the computation that you expect.

One covers the full range, N2:N30, but the others only cover N2:N27

This results in 182.35 instead of 192.03.

1 of 1 people found this helpful
• ###### 6. Re: Calculation sum up hours in rank

Hi Joe,

Thanks a lot!!

You're right, my Excel isn't consistent. I changed that.

The Tableau Dashboard that you have created is almost the same as the Excel file. The only problem is the sorting of the hours. In the Excel file are sorted from high to low hours per day. This is independent of the Licenseplate.

Is it possible in Tableau to do that?

What I want is exactly a copy of the Excel file.

I've learned a lot of your attached Workbook!! Thanks again.

I hope that you can help me with the last step!

Best regards!

Gert-Jan Neeft

• ###### 7. Re: Calculation sum up hours in rank

Hi Joe,

Is it possible to check the Surcharge hours?

It is at this moment not correct, I have to be 192 and there is 1408 in the Workbook.

Thanks a lot!

I'm learning so much in Tableau!!

Best regards!

Gert-Jan Neeft

• ###### 8. Re: Calculation sum up hours in rank

Hi Joe,

A couple of weeks ago you helped me with this case.

Is it possible you can help me with it?

I've been trying a make this dashboard, but I cannot make it by my own.

I hope you'll help me!

Thanks!

Gert-Jan