Crystal Reports Pie Chart - How to show 0 values in legend - charts

I am creating pie charts in Crystal Reports to show the number of grades awarded to a student in various tests throughout the year. A student can be awarded a grade 5, 4, 3, 2 or 1 only. Here is an example of a pie chart for one student.
This student did 5 assessment points in the class shown in 2014. He got a grade 5 for one assessment, Grade 4 for 3 assessments and then one Grade 3 for another assessment.
Is there any way, in the legend, of showing the colours that are used for Grades 2 or 1 and showing them as 0%. that is, how can I show all 5 grades in the legend, and, if a student hasn't received that grade, it still shows in the legend with a count of 0 and 0% next to it?
Any help greatly appreciated.

Related

Tableau Parameter/Reference Line Help - Change One Column Instead of All

I have received a workbook from a coworker and they used parameters to give a color code (green when under two hours, red between 2 and 4, red between 4 and 6, red between 8 and 10). The ask was to change only one of the columns. In this case I need to change the between 2 and 4 Avg. Cycle Time for Process Cycle to green and leave the other 4 Cycles as red.
This is what my reference lines are showing for this column.
and this is what my parameter is set up like.
The values I believe are from Avg. Cycle Time (hours).
I have tried setting other parameters, I have tried using level of detail for some attempts, I'm fairly new to tableau and just needing some guidance here.

Campaign analysis in Tableau

I am doing campaign analysis and the objective of campaigns is to convert lead into customer. I want to see how many leads are exposed to how many campaigns in terms of percentages before they convert to customer.
Below is the sample data where there are four unique lead.
abc has seen three campaigns, efg has seen two campaigns and so on and so forth
I want to show in pie chart may be something like below in tableau where out of 4 leads 2 leads has seen 1 campaign each so 50%, 1 lead has seen 2 campaigns so 25% and 1 lead has seen 3 campaign so another 25%
First of all you have to find how many campaigns have been exposed for each Lead, Count Campaign:
{ FIXED [Lead id] : COUNT([Campaign])}
Since you want to breakdown your pie with this value, you need to convert this calculated field into a dimension.
In order to calculate the % you're looking for, you need just an additional step; Metric:
COUNTD([Lead id]) / attr({ FIXED : COUNTD([Lead id])})
Doing so you're going to compare each value to the total distinct value of your Lead (4)

Rank dates in Tableau

How can I rank dates on Tableau?
By customer, I have a list of codes banked (every code has an ID and an issue day) and I am interested in calculating the number of days between the first banked code and (as exemple) the 10th code (the difference will be calculated on the issue days).
Some people may have 1 code, some 2, some 10, some 100, etc. I'm only interested in calculating this metric when the number of codes banked is > 9.
The result will be, by customer, Code 10 Issue Date - Code 1 Issue Date.
So I expect that most engaged customers will bank 10 codes in 10 days, less engaged customers will bank 10 in more days.
EDIT: added below an example of the data source (first three columns) and the missing fields to be calculated (last two columns)

Calculating min and max timeperiod in Tableau

My data has 7 products, product 1 achieved 100K sales in 2nd week and product 5 in 7 weeks. I need to show min. weeks to achieve 100K as 2 and max. week to achieve 100K as 5 across list of products I have in data. Can anyone help on the code to be used in calculated field?
Here is an example of using table calcs to show when a running total crosses a threshold http://community.tableau.com/docs/DOC-5451

How to select one value to be displayed in SPSS to be displayed as chart

I have two variables Career and Internet usage, there are two career options but I only want to select one value.
When I generate the pie chart in the output window I get and overview of internet usage but it includes both of the careers I only want a specific career to be shown in the pie chart e.g
How do people from System engineering use the internet as opposed to how does everyone use the internet
I don't know if this is clear, but if it is how would I do this in SPSS? is there some sort of filter_?
For one chart you can use TEMPORARY followed by a SELECT IF. If the the chart command follows directly after it will only plot that subset.
DATA LIST FREE / Career Internet.
BEGIN DATA
1 1
1 2
1 3
2 1
2 2
2 2
END DATA.
VALUE LABELS Internet
1 '2-4 Hours a Day'
2 '5-7 Hours a Day'
3 'Over 7 Hours a Day'.
TEMPORARY.
SELECT IF Career = 2.
GRAPH
/PIE=COUNT BY Internet.
If you have multiple charts see the FILTER command.