6 Replies Latest reply on Aug 24, 2016 9:17 AM by Vijay Kumar

Find the Max Concurrent Users by Date but calculate using Hour

I have a data with Timestamp, Date, Time, Usernames as shown below

I have a chart 1 which shows HOW MANY CALLS DIALED TOTALLY FOR THE PARTICULAR DAY and HOW MANY USERS (COUNT DISTINCT) WERE USING THE CALL SERVICES for the day. The result got in Tableau is shown below.

I want to find out what how many # of users were using the call services concurrently every hour for this date. I am able to find it as shown below

As you could see from above screenshot 15 users were using the call services around 7 AM for this particular date 1-Aug and this is the maximum number of concurrent users out of total users 76 on 1-Aug (refer chart 1).

I am able to show this in hourly chart. Users are now currently selecting the date on the 2nd chart to find out the maximum number users using the call services concurrently.

I need help to show the result finally as a chart for MAXIMUM # OF USERS USED THE SERVICES CONCURRENTLY FOR EACH DATE.

a chart like below

1-Aug        15

2-Aug         So on...

Really need your help to achieve this please. I am attaching the sample workbook and also the packaged workbook

• 1. Re: Find the Max Concurrent Users by Date but calculate using Hour

Try this - it works based on your sample excel containing only 1 day.

Create a calculated field with the formula: { FIXED [Date],DATEPART('hour',[Timestamp]):COUNTD([Username])}

When using that field to create your table set the aggregation to MAX. It will default to SUM, which will give you the wrong result, that will actually sum the distinct count for each hour when you want the MAX of all hours.

• 2. Re: Find the Max Concurrent Users by Date but calculate using Hour

Hi Andrew,

I tried to create the field as advised but getting an error as shown below.. Any suggestions please

• 3. Re: Find the Max Concurrent Users by Date but calculate using Hour

That error means create a new calculation first

Calculation1:

DATEPART('hour',[Timestamp])

Then use below calculated field

• 4. Re: Find the Max Concurrent Users by Date but calculate using Hour

Strange error...I didn't get the error doing the same thing. Try creating the datepart as a calculated field and see if that works. I'm using Tableau 10, if you're using 9 maybe it's an improvement in the later version.

Sent from Samsung Mobile

• 5. Re: Find the Max Concurrent Users by Date but calculate using Hour

Yep, it's a version thing. With each release since v9.0 Tableau has enabled more capability in the dimension declaration side of LOD expressions, before then we have to create calculated fields or custom dates.

• 6. Re: Find the Max Concurrent Users by Date but calculate using Hour

Wow that worked perfectly.. Thanks friends..

On 24-Aug-2016 9:08 pm, "Aseem Bhartiya" <tableaucommunity@tableau.com>