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

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.

Related

Boxplot is broken, only showing one line

so my data centres around different treatments and how they impact the day of germination. image of dodgy boxplot data
A while ago whilst making violin plots in R to show the distribution of when germination occurs according to treatment, I attempted to add a boxplot as a descriptive statistic and was met with only one line.
I contacted many people who simply had no idea what the issue was, I used this same data in another violin plot as part of a bigger data collection with more treatments including this one.
I moved on from this and found it odd, now when I have come to perform stats tests in SPSS, I have the same problem as imaged below. When I try a Mann Whitney U test I am told "cannot compute" due to not having solely two variables, when I try a Kruskal Wallis test I am met with the dodgy boxplot below and I am told pairwise comparisons cannot be done due to less than 3 test fields (i.e. 2).
I am at an absolute loss, I have tried rewriting the data out, copying data labels with 'stratified' 'strat' 's' etc and I have no idea where the problem could lie, if anyone could give me any guidance this would be really appreciated!
Thank you
The dependent variable in question appears to have only values 1, 2, and 3 in the Stratified group. If there is at least one case with a value of 1, at least one case with a value of 3, but most values at 2, then a box plot like you're seeing would be expected. In SPSS, run the EXAMINE procedure (Analyze>Descriptive Statistics>Explore in the menus), specifying the same dependent variable and grouping variable, and asking for percentiles. The box plots should match what you're getting, and in the percentiles table you should see that Tukey's hinges show the same value of 2 for the 25th, 50th, and 75th percentiles.
Tukey's hinges are the basis for the box and the line in box plots. The line is at the median or 50th percentile, and the upper and lower box edges are at the 25th and 75h percentiles, respectively. When all three coincide, you get just a line instead of a box.
There are two types of outlying values identified in box plots in SPSS. Points greater than 1.5 box lengths below or above the box edges are outliers, marked with circles, and points greater than 3 box lengths below or above the box edges are extremes, marked with asterisks. Since the box length here is 0, anything at other values is automatically an extreme.
Pairwise comparisons following a Kruskal-Wallis test are available only when there are at least three groups, since with only two groups the overall or omnibus test has already compared the two groups. I'm not sure what the issue was when trying to run a Mann-Whitney test.

In Tableau how do you change y-axis to be calculated by custom function?

I am working with a 2 y-axis graph, one is generally between 40K and 60K, the other between 5K and 10K. What I would like to do is set the the 40K to be a number such as if the MIN = 42K, start at 40K and increment by 5K. If It is 38K, start at 35K. Similarly for the 2nd y-axis, do the same but based on 2K increments. When I set it to automatic I get basically straight lines or I say do not include 0 and i get huge drastic swings. I can set the starting and set the increment, but that means every day I would have to go in and verify that still works, for example 40K is a good start, but one that that may be too high or too low. (I suppose the fact it is 2 axis has nothing to do with it, but in case it does) The key is dynamically changing based on the result set.
If there is a better way to do this, I would love it. However, this got me close to what I wanted. First, I created 2 calculated fields, MIN and MAX using a windowed function on the data. They look something like this below. Note I did 2x the differences to give a window that is roughly 5x the total distance from min to max. Better math could give a better sizing.
Max_Ln=WINDOW_MAX(SUM([Profit]))+(WINDOW_MAX(SUM([Profit]))-WINDOW_MIN(SUM([Profit])))*2
Min_Ln= WINDOW_MIN(SUM([Profit]))-(WINDOW_MAX(SUM([Profit]))-WINDOW_MIN(SUM([Profit])))*2
I then added both to the Details pane and used this to add reference lines. I added the reference line with no title and no line. This will cause the automatic spacing to take them into account, but not show anything. From there I did the same on the 2nd y-axis and now everything looks good and will adjust dynamically.

How to get three measures in a single chart?

I want three measures in a single chart.
Time spent by an employee in the office. (Available hours)
Time spent by an employee on productive tools. (Productive Hours)
Percentage of time spent productively. (PH : AH %)
I have used dual axis for 1 and 2 as 2 will always be less than 1.
I want it to look something like this
The problem is when I use blended axis it does not show the "tools hours" as a part of "available hours". So for example if an employee was available for 5 hours out of which he worked on productive tools for 3 hours the blended axis will show total available hours to be 8.
Your available hours is aways greater than your tools hours?
So, you should use a calculated Field where you show the tools hours and the "available hours" - tool hours.
It can also be solver by transforming your data source input.
PS: Yes, you can make formulas (calculated fields) across joins and blendings.

I literally don't know what I need to do for this but it needs to be done and evaluated within a couple of days

1 It's an Emergency.
2 For one of my programming units we have to create a 'UCAS' points calculator in Net beans. UCAS sort out all of the university stuff in the UK.
3 So I need to create a GUI that has text boxes and buttons and I need to enter the amount of passes, merits, and distinctions I've got on my course, which will give me a total amount of UCAS points.
4 Passes = 70 points
5 Merit = 80 points
6 Distinctions = 90 points
7 There's 18 units in total, so if I enter I have 4 passes (a pass for 4 units) the box with the total amount of UCAS points needs to go up.
8 I need three boxes, one for passes, merits, and distinctions, and the box for the total amount of UCAS points. It needs a calculate button of course and a 'reset facility'. It says that the current date needs to be seen on the interface.
9 It also says that there should be an option to quit the program at any time.
10 It has to be a **GUI** and I literally don't know what to do and I don't want to fail again.
11 Can someone help me?
12 I literally don't know how to make the buttons work or anything.
I don't even need any help I just need someone to show me exactly what to do because I haven't got a clue.

Can't Repeat Column Groups AND ALSO hide Static Columns within a Matrix

UPDATE
When I first asked this question, I didn't fully understand what the problem was. Your best bet is to glance over the issue below and then read my answer.
I have a report with a matrix where the data looks like the following:
Name Id Activity 1 Activity 2 …Acitivity N
Smith 1 77 100 nn
Johnson 2 88 99 nn
Name and Id are in a group.
When the number of activities are greater than 11, I need the columns Name and Id to repeat when the report renders in a PDF.
Here is an example of report recently run:
Page 1 (NOTE: red boxes indicate
personal data filtered out):
Page 2:
I've been fiddling with the properties RepeatRowHeaders and RepeartColumnHeaders, but I have had no success.
How do I make this column repeat?
Sadists can check out the rdl file here.
Short Answer (and a plea from me):
Please vote on this Page to conditionally hide non-group matrix columns.
Long Form:
I found the solution to my problem, but first was figuring out the exact issue. An SSRS Matrix has the ability to repeat columns on subsequent pages as its width grows when RepeatRowHeaders and RepeatColumnHeaders are set to True. So that part of my report setup was fine.
My problem was that my grid was set up as follows:
What you see above is a Tablix containing a Matrix. The blue represents a normal Tablix with four columns. The green Represents a Matrix within Column 4 that has N number of columns.
So even with the properties RepeatRowHeaders and RepeatColumnHeaders set to true, Columns 1-3 would not repeat as the data in the Matrix extended to multiple pages. This is because the outer Tablix (e.g. the blue part) only saw Column 4 as growing outwards instead of the individual columns in the inner matrix.
In order to make the columns repeat, I had to alter the grid like so:
This grid is only one matrix; not a Matrix within a Tablix as the first image depicted. I pulled the matrix out and added "Static Columns" to the left. This made Columns 1 - 3 repeat on multiple pages as the Matrix grew.
All seemed well, but here's the rub: Static Columns cannot be hidden or, more aptly put, you can hide the data within a column, but the column itself will not shrink.
So, when I hid Static Column 3, my report looked something like this:
Notice the white-space Gap. This solution simply would not work. When I found that I was stuck in an either/or situation (either have the ability to conditionally hide columns or Repeat Columns on Subsequent Pages), I used one of our Microsoft Support Incidents to analyze the report and come up with a solution.
Microsoft was nice and knowledgeable and even pointed to a article in their forum stating they were considering allowing SSRS to have the ability to hide static columns. However, in the end, they said we were stuck with the either/or situation. (BTW, note that forum thread was answered in 2006.)
So after that long process with Microsoft, we were still stuck with our dilemma. Fortunately, one of our fellow programmers came up with a workaround: put the columns you want to toggle visibility within the Matrix itself.
And that's what I did. It took some finagling with the report SQL (and creating a statement I'm not particularly proud of), but it works.
So now the working report looks like this:
That's one Matrix, two static columns that always need to repeat on every page and Column 3 which is now part of the dataset used for the Matrix.
Once again, I plead with the community to vote on this Page to conditionally hide non-group matrix columns. It would make constructing future reports like this much easier :)