In campaign analysis I want to view in Tableau what is the last campaigns that a lead has seen in a particular month and region. A lead may saw multiple campaigns.
For e.g. in sample data set below Lead id abc has seen two campaigns – webnair, email and last one is webnair.
Lead id efg also has seen two campaigns webnair and email and webnair is the last one. Lead id fgh has seen one campaign - Tradeshow
So in filter(month and region will be in filter) when February and US is selected the view will be a bar plot showing webnair as count 2 and tradeshow as count 1. This will give an idea of which campaigns happens mostly before the lead converts to customer.
Had some insights here Campaign performance in Tableau. Tried replicating here with some changes but no luck so far.
Like earlier ones this one is also not difficult.
Create Desired_field by adding a calculated field as
if [Month] = {fixed[Lead Id]: MAX([Month])} then 1 else 0 END
Create a view like the screenshot. (Note: Don't forget to add filters to context!)
Please note that in case of UK, and if FYU the two campaigns are on same date. This will count both campaigns in the view in case of Feb and UK are selected.
Related
I am doing campaign analysis in Tableau where I want to see the percentage of leads that has seen 1 campaign,percentage of leads that has seen two campaign and so on in pie chart filter by month and region before they convert to customer.
For e.g in below sample data set there are 5 leads in February of which only lead id abc has seen two campaigns and rest four has seen one campaigns. So the view will be pie chart where 20%(1 out of 5) of lead has seen two campaigns and rest 80% has seen 1 campaigns. If March is selected then pie chart will be 100% one campaign as there is only 1 lead.
If in region filter US is selected then there are three unique leads(abc,efg,klm) in february and view will be pie chart with 33% lead has seen two campaigns and rest two i.e 77% has seen 1 campaign.
I got idea from the link here but not able to do it when month and region filter is added.
Campaign analysis in Tableau
Just add two calculated fields both LOD, as detailed below-
Campaigns per Lead as
{ FIXED [Lead id] : COUNT([Campaign])}
'Measure_val` as
COUNTD([Lead id]) / ATTR({ FIXED : COUNTD([Lead id])})
Format Measure_val as per cent in number format.
Add your filters to view, add both filters to CONTEXT by right clicking them (Note: In order to have filters calculated before LOD calculation. Normal filter calculates the view after LOD fields are calculated). Check whether filters have been greyed out.
Convert Campaign per Lead to dimension by right clicking it.
Add Measure_val to size, angle and text(for label-optional) and Campaign per Lead to color and text(optional again) and you're done.
Do tell if it worked.
I'm trying to create a dynamic dashboard for tracking student attendance patterns. When you choose the student from the drop-down in cell C4 in the Student Tracker, the data and charts all change dynamically. The way I've created dynamic charts is by "hiding" queries and other calculations behind the charts and making the text the same color as the background so that they aren't visible. Here's a shared copy of the dashboard with anonymized data: https://docs.google.com/spreadsheets/d/1nyI6h8aiPcJiqPIDWE6AsmCIPt_Vhj0dHdKtmsoqfuk/edit
I'm trying to create a chart that will show monthly patterns for the selected student, looking at the percentage of times they were marked "Present", "Excused absence (E)", etc each month (very similar to the days of the week chart).
This is the formula I tried:
=Countif(Query(ATTDATABASE!$A$2:$M,"select E,G,I,K,M where C='"&$C$4&"' and B >= date '"&TEXT(8/1/2019,"yyyy-MM-dd")&"' and B <= date '"&TEXT(8/31/2019,"yyyy-MM-dd")&"'"),"Present")
It keeps counting 0, even though I know the selected student was marked present in August. Even if I take out the other columns and just leave it as "select E...", it still counts as zero, even though I know the student was marked present on a Monday (column E) in August. I know there's got to be a way to do this, but my Google Sheets chops just aren't quite strong enough yet to figure out the magic combo/syntax.
try:
=COUNTIF(IFERROR(QUERY(ATTDATABASE!$A$2:$M,
"select E,G,I,K,M
where C='"&$C$4&"'
and year(D) = 2019
and month(D)+1 ="&MONTH(LEFT($G20, 3)&1))), "Present")
I'm very new to Tableau, and (maybe because of that) struggling with a graph setting. I need to plot a simple line graph showing the ratio between the number of users that returned after registered x days ago and the total number of users that registered x days ago (regardless on the fact that they returned or not). To do this, I have two tables: TableA having (simplifying) USER_ID and DATE_REGISTRATION, and TableB USER_ID and VISIT_DATE. Both table are joined by USER_ID.
I'm able, of course, to plot each individually (i.e. count distinct of USER_ID with DATE_REGISTRATION on the x axis to get the number of new users registered per day), but not able to combine them. I guess the problem is that I'm using either DATE_REGISTRATION or VISIT_DATE on the x-axis, but in this case I can get one or the other info, but not the two combined.
Ultimately, I would like to be able to have, for each date, both the number of users visiting and the number of user who registered.
Thanks a lot in advance.
Raffaele
Well, problem is your database is not ready to generate those analysis. Your table is user_id oriented, meaning you can do lots of analysis centered on the user_id. To do date oriented you need a table like:
Date User_id Type of event
01/01/2014 1234 Registration
02/01/2014 1234 Visit
Then you can drag Date and Type of event to Columns, and COUNTD(User_id) to rows, to get a bar chart that will show, for each day, how many people registered that day and how many people visited that same day.
Additionally, you can still join this table with the one you have, to have the registration date for each user_id. That way you can, for instance, calculate how many days have passed since registration.
I am a beginner in iReport and I cant program Java so I hope you can give me an idea.
I've already managed to make a chart that displays how often all customers have ordered in february, march,... etc.
Thats how I did it:
In category expression I have: $F{Month}
In value expression I have : $F{count(Orders)}
But I want to display how often only one customer (for example customer a) has ordered in february, march,... etc.
I have the following values which i can use:
Month, Orders and Customers(here are all customer names saved)
-------//-----------UPDATE--------------//-----------------------------------
I want to display a chart which represents the total orders per month of a customer. But iam trying to display my 3 customers (my database has only 3) in only one chart (stacked).
For example(see picture above): I want to display the total orders from Customer A (yellow) in february. And I want to display the total orders from Customer B (blue) in february and the same for customer C.
The customers should be displayed stacked (3 in every month) and every customer should have a different color plus the total orders from every customer should be displayed ...like in picture above for example:
customer A(yellow) made 3 total orders in february, Customer B(blue) made 2 total orders in february, customer C..etc.
it is very important that every month displays 3 customers...stacked.
How do I do this?
I appreciate every idea.
From what I have understood from your question, you want to show a chart which represents the total orders per month of a customer.
You need not use stacked bar graph for this purpose.
You may want to use bar graph which would serve your purpose.
If you want to see the chart per customer, create one parameter $P{customer} and pass it into your query.
Refer document iReport-Ultimate-Guide-3 on how to create parameters and to use it in queries.
e.g:
select customer,month,count(orders)
from <your table>
where customer=$P{customer}
group by month
The above approach would work if you want to see the details for only one customer.
**Here is my solution after your update.**
From your update, it seems like you want to represent the total orders per month for all the customers.And you want to use stacked chart for the same.
Then what you have done is correct but have missed to add a field to your 'Series Expression'
Add your field customer to your series expression and this will resolve your problem i.e,
Series Expression : $F{customer}
Category expression : $F{Month}
Value expression : $F{count(Orders)}
This will display the chart in the format you have specified.
Create a paramter that takes your customer name $P{customerName}
and another takes month $P{month}
pass these two paramters to your sql like that
SELECT customer_name, order_count FROM customers
bla.. bla..
WHERE customer_name=$P{customerName} and month=$P{month}
then create a chart with only one serie to show one customer as one color. Not like yours with 3 colors.
Fell free to ask for more specific detail.
I have my sql database Views available to my report, but sometimes they return multiple values, for example I have one that shows me the Total Credits for a range of years.
When I click "Browse Data.." it lets me see what bits of data are available
Eg:
Credits
-------
31
45
460
But I want to select 45 (based on a customer ID)... is it possible to do this?
EDIT: An alternative is if I can link the Customer ID from two views, but only if it's not null (as sometimes there are no records in the Credits)
To avoid the problem of unintentionally "deleting" customers from the report results, first do a left outer join between the CONTRACT_VIEW and the year views, such as TOTAL_2013. In your selection formula, instead of just doing something like {TOTAL_2013.Customer_ID}=MyCustomerID, add all the nulls to it as well, so: isnull({TOTAL_2013.Customer_ID}) or {TOTAL_2013.Customer_ID}=MyCustomerID. This will prevent customers who don't have any entries in the by-year views from being removed completely from the report.