How to benchmark in Tableau - tableau-api

The database has a column Booking Count (can be more than 1) against every passenger_id (unique id).
"Booking Date" against each entry I am creating a dashboard which has to have:
% of booking shares
% increase or decrease compared to the last month
ex:
Passenger_id Booking count Booking Date
axxxx 4 3/3/2015
acccc 1 3/5/2015
How do I do it on Tableau?
Please help me.

Related

Data studio calculated fields

I have the following dataset:
Week #
Company Name
Product
# of transactions
Week1
Company A
Product 1
100
Week1
Company B
Product 1
30
Week1
Company A
Product 2
100
Week2
Company B
Product 2
50
My goal is:
for each COMPANY (there could be multiple rows per company) calculate Usage score with the following formula total # of transactions per company/100. For example, from the table above Company A has 200 transactions and Usage score=2 - I've done it successfully
categorize each company per the following formula: when usage score>1 then "promoter" else "critic" - I've done it successfully
Count promoters and critics - that's where I fail. Data studio in this case calculates Usage score and NPS per row, not per company. Therefore, I have promoters per product, not per company.
please help, I'd appreciate
You can solve this by Re-aggregating the Datasource with itself where the Second Join is the Datasource itself with the Key Company Name and the Metric Usage score make sure to set its Aggregation to Average.
Now you have a new Datasource with each Company and Row having its Usage Score in one column.
Unfortunately I don't understand the NPM part.
Hope this help though

Crystal Reports Crosstab Summary Row Count of Subset of Data

I have a crosstab report that counts the instances of records (that I have previously filtered via the Section Formula Record method).
I would now like to also include a second count of the records that are a subset of the original set of records.
IE In my booking app, I have a count of all the booked seats in a restaurant, I would now like a count of all the seats that were booked online. (and of course this is all grouped by restaurant at the top and then each row is the day.
I hope that makes sense, - thanks in advance.
Create a formula such as IF <Booked_Online> Then 1 ELSE 0
Then, SUM that formula to get the count of booked online.

LoD expression to calculate the average count of one dimension id based on another dimension id in Tableau

I have a dataset consisting of unique trips (IDs), users_id, and bikes_id and time-stamp
trips_id, users_id, and bikes_id are dimensions:
A trip_id is unique
A user can have multiple bikes_id and trips_id
A bike can have multiple rides and multiple users
I would like to show how many rides there are (on average) per user, how many bikes are used (on average) by user and how many rides there are per bike.
Is there a calculated field or LoD that can do this calculations? So I can show per week, month or another time period?
I would like to show how many rides there are (on average) per user
use this CF (average for whole data)
{AVG({FIXED [USER] : COUNTD(TRIP_ID)})}
how many bikes are used (on average) by user
use this
{AVG({FIXED [user]: countd(bike_id)})}
how many rides there are per bike
use this
{AVG({FIXED [bike_id]: countd(trip_id)})}
NOTE these calcs will give you average for whole dataset

Count at the end of a month in Tableau

I want to find the number of customers per subscription plan at the end of the acquisition month.
As you can see in the workbook, customers can change their subscription plan on any date, but I only want to find the subscription plan at the end of the acquisition month.
I created a field, called EOM Acquisition, but need to find the desired output below for any given month of acquisition. (in sample dataset only October).
How can I do that? Thanks in advance!
Please proceed like this. Create a new calculated field say calculation1 as follows-
IF [Date] = [EOM Acquisition] then [Subscription Plan] END
drag this field instead of subs plan in view and filter out null values, you'll get what you want
Another way add a calc field as follows
IF [Date] = [EOM Acquisition] then 1 ELSE 0 END
And thereafter add sum on this field as measure alongwith EOM and subscription fields.

Visual Studio 2008 - name with more than one visit. I need an expression to count a distinct name ID on a date

I have a Visual Studio 2008 report with name, nameID, date of service, DOB and several other columns. I need to count the distinct name (using the name ID) visits (date of service). Some names have more than one date of service with more than 1 transaction (names=30, datesvc=36, transactions=80).
They are grouped by Name, NameID (hidden), DateSvc, Transaction.
I thought Count(DateSvc) would work but it gives me the same amount of transactions, not visits.
Any help is appreciated.
I cant put a sample of the data due to confidentiality. But here's a typed sample of it:
Name......Date......DOB......More columns
DOB to the right can be several rows depending on the transaction
Service Date can span one or several rows depending on the date of the transaction
The name spans all rows for that persons transactions on the specific service date
Name.....1/1/16.....9/5/2008.....trans 1 for that day
...............1/4/16.....9/5/2008.....trans 1 for that day (same person)
...............1/4/16.....9/5/2008.....trans 2 for that day (same person)
Name.....6/9/16.....3/7/2002.....trans 1 for that day
Name.....6/9/16.....5/1/2000.....trans 1 for that day
This should show 3 names, 4 visits and 5 transactions
The 4 visits is where I'm having the problem.
Or a Snippet of the above but with data deleted out:
I hope this gives more clarity.
Based on the example you put in your question I built a tablix with the following expressions:
Total Names: =CountDistinct(Fields!Name.Value)
Total Visits: =CountDistinct(Fields!Name.Value & "-" & Fields!Date.Value)
Total Transactions: =Count(Fields!Record.Value)
In your case Record should be MedicalRecordNum and Name should be PatientID instead of the name to avoid counting people with the same name.
The result is:
Let me know if this helps.