keepitreall89
keepitreall89

Reputation: 1230

Tableau Maximum of a Sum

I am relatively new to Tableau and this problem has been a real head scratcher.

I have a database table with a similar layout to:

ID INT (Unique ID)
create_ts DateTime

What I want is a bar graph that is bucketed for each hour (0-23.) This was easy enough to accomplish with Tableau's Datepart function. But for the height of the bars, I want the maximum count(*) that happened during that hour on any given day. So for hour 1 (1 AM) I want to see the highest number of count(ID) with a create_ts in the 1 AM hour calculated by day of create_ts. Hopefully that makes sense. Basically looking for peak numbers.

I have looked into "Level of Detail" calculations for Tableau, but was unable to make this work. I am on Tableau v10

Upvotes: 0

Views: 1377

Answers (1)

Prem
Prem

Reputation: 11965

Hope this helps!

Create calculated field maxIDCount having definition as below and use it as the vertical bar field.

{fixed[datepart_hour_field]: countd([ID])}


Don't forget to let us know if it solved your problem:)

Upvotes: 1

Related Questions