How to calculate summary and boxplot in minitab data with conditional case? - minitab

I am trying to create summary statistics and boxplots between Pulse1 and Smokes with the condition as follows
Pulse1 & Smokes==No
Pulse1 & Smokes==Yes
Smokes "No" = The person is not a smoker
Smokes "Yes" = The person is a smoker
I have tried to modify by simply separate "No" and "Yes" in the SMOKES header, but it took me a lot of time since the data is big, and the screenshot below took only a few examples. How can i do this without modifying the data as i done before? I'm open for any suggestions, thank you so much

Hmmm. This looks like really elementary Minitab so perhaps I am misunderstanding your question.
I've loaded Minitab's example data set Pulse.MTW, which looks like your example data with some variables coded as numbers rather than text:
menu Stat > Basic Statistics > Display Basic Statistics...
Set:
Variables: Pulse1, By Variables: Smokes
Click Graphs... and tick
Boxplot of data
Click OK a couple of times
Is that what you wanted?

Related

How to add descriptions on selected data series to an area plot in mathplotlib

I created a graph that looks alright to me with the following line of code:
df_wide.plot.area(xticks=df_wide.index, legend=False, xlabel= 'Week', ylabel='Percent', title='Percentage of Letters')
However I would like to add the name of selected (or all) dataseries to the right side of the Graph, so that it attaches little lines to the right side and the column name appears next to it, I attach a picture with my current output and how I want it to look (not exactly well edited, but I am sure you get the idea)...
Maybe somebody can helb me :) Thank you!

How do I get more information from an additional column if the first one does not have it?

I would just like to say that I'm very new to VBA and more complicated formulas so all the help will be appreciated! Thank you!
To clarify a bit more with the title. I currently have a Macro that is reading a formula to give me information from another worksheet. I'll give an example of the formula that is working:
=IF(A2 = ""No Specific Program"", A2,IF(F2 = """",""No PIN"",IFERROR(VLOOKUP(CONCATENATE(A2,F2),....!$C:$I,4,FALSE),""NO DATA"")))
This is the original formula that I'm using to get the information, column A is my Parts owned by Program, And my column B is the actual Program. So when I run the Macro it does give me most of the information, but when it runs into "No Specific Program" even when there is something for Column B showing what program the part is in, it will give me No specific Program.
Also for reference the F2 it is Concatenating is a PIN number which will help determine who owns the part.
I've been stumped on this trying to get the code to work and I've tried place THEN and ELSE within the statement and it just gives a FALSE statement
EDIT:
The Code above works, it's when I use this version of the Code:
=IF(A2 = ""No Specific Program"",THEN,IF(F2 = """",""No PIN"",IFERROR(VLOOKUP(CONCATENATE(A2,F2),'.....'!$C:$I,4,FALSE),""NO DATA"",Else,IF(A2 = ""No Specific Program"",THEN,IF(F2 = """",""No PIN"",IFERROR(VLOOKUP(CONCATENATE(A2,F2),'.....'!$C:$I,4,FALSE),""NO DATA"")))))
I get the False or errors when I try different variations. Here is an example of the columns. Column A is where I have the original formula reading from, but then it says No Specific Program, while Column B shows the Program. So I'm trying to get the formula to read that as well as column A to capture all the information I need :
Columns Example
EDIT:
It starts breaking after the ELSE statement.
Edit:
=IF(A2 = ""No Specific Program"",
IF(F2 = """",""No PIN"",IFERROR(VLOOKUP(CONCATENATE(B2,F2),'\NW\Data\TechIntegration\Sustaining
Team\Data
Mining\DataMining[GAD_PIN_TABLE.xlsx]Sheet1'!$C:$I,5,FALSE),
""NO GAD
DATA"",
IF(F2 = """",""No
PIN"",IFERROR(VLOOKUP(CONCATENATE(A2,F2),'\NW\Data\TechIntegration\Sustaining
Team\Data
Mining\DataMining[GAD_PIN_TABLE.xlsx]Sheet1'!$C:$I,5,FALSE),""NO GAD
DATA"")))))
Just trying to make it easier to see the formula.
I'd split this down to make it simpler to follow, use a holding cell then refer to that in your top formula (The one you know works already)
Stick this in another column, say Z for example, then everywhere you refer to A2 in your working formula, change it to Z2
=IF(A2=""No Specific Program"",IF(B2=""No Specific Program"",""No Specific Program"",B2),A2)
This will only give you "No specific program" if both a2 and b2 contain "No specific program" which I think is what you're after. In your second example in the columns example link, it will return NG

dynamic row print area excel VBA

I want to give the user the option to press "set print area" and the area printed is determined by which date they fill in.
The 2nd row always contains today's date. and then there is 2 years of data after that. Maybe the user only wants to print for first 3 months.
So the set print area code should be written something like.
row = len(date max - len today)
I am very new to VBA, so have no clue how to write this.
thank you!
I'm not sure why you want to use VBA to do this when you can just use 'Filter' on the data you have. On the date column you can then use the in-built 'Date Filters' to filter out any range of data. Once you specify the filter, print command will only print the filtered data set and not the complete data set.
Anyways if you want the row it can also be achieved via Excel Formula:
=ADDRESS([dataset_first_row]+MATCH([set_print_area_date_cell],[dataset_date_range],-1)-1,2,4,1)

How do I use a shape's ID from another field to define beginX

Background: Novice user and VBA programmer - be gentle, please.
Scenario:
Using a Visio (2010) straight line connector;
Currently 1-D Endpoints.BeginX is as follows:
=PAR(PNT(Milestone.40!Connections.X1,Milestone.40!Connections.Y1))
What I have:
A data field in the same shape called BeginItem that contains the Visio ID (e.g. 87) of Milestone.40! above.
What I need to know:
If possible, how to change the formula in 1-D Endpoints.BeginX to something like:
=PAR(PNT(BeginItemValue!Connections.X1,BeginItemValue!Connections.Y1))
and if not possible, is there an alternative way of doing this?
Thanks!
Thanks for helping all. A combination of all advice led me to an alternative solution.
Instead of trying to refer to the field in the Shapesheet that does contain the BeginItemValue, I built the entire string (in VBA) by concatenating the parts and then updated the BeginX value with it.
shpObj.Cells("BeginX").Formula = "=PAR(PNT(" & BeginItemValue & "!Connections.X1," & BeginItemValue & "!Connections.Y1))"
That worked well, although I'm sure there are easier ways of doing it.

How to Create a Report Containing 3 DataTables

Goal
I want to create a report that will contain three DataTables (unless doable with 1 DataTable, you tell me!). The following screenshot displays ConveyorNames, OptionNames, ConveyorOptionPrices:
Problem
The problem I am facing is I cannot seem to figure out how I will go about displaying horizontal conveyor Names (Conveyor1, Conveyor2, Conveyor3, ...) horizontally while displaying OptionNames (Optn1, Optn2, Optn3, ...) vertically; while at the same time populating the price for Conveyor1 and Optn1 (and so on) in their relative cells.
I'd like to provide something that I have tried, but nothing conclusive as of yet would be useful here. To be honest, I don't even know where to start. If anyone can point me in the right direction, I'll be very thankful!
I figured it out using only 1 DataTable. You must create a Matrix and attach this DataTable to it.
Related to my example, my DataTable will contain the following fields: ConveyorName, OptionName, and OptionPrice like so:
Afterwards, I just loop through my three DataTables and fill in the fields like so:
For Each convRow As ds1.dtConveyorsRow In dsConv.dtConveyors
For Each optnRow As ds2.dtOptionsRow In dsOptn.dtOptions
For Each convOptnRow As ds3.dtConvOptnsRow In dsConvOptn.dtConvOptns.Select("FK_Conveyor=" & convRow.PK_Conveyor & " AND FK_Option=" & optnRow.PK_Option)
dtRpt.AddConvOptnRow(convRow.ConveyorName, optnRow.Name, convOptnRow.Price)
Next
Next
Next
Which populates it exactly as I showed in my question's picture.