I need to add few column headers in Table chart in Spotfire. Typically some calculated/transformation are added for the creation of new column. i just need to create the column with a name and keep it empty since the space will be used to fill data after the report has been printed. Any expression to make the column empty is also fine but want to know whether an empty column can be added
you can add a new calculated column with a formula of "" or NULL to make it empty
Related
I have a column of data with various things. I want to turn the first row of the column into that drop down list where I can filter all of the below data. When I try data validation it doesnt filter the data when I chose from the list.
The option called filter does this automatically after you highlight the whole column.
I have an excel worksheet where I have a number of manual data entry and calculated columns, which is to be filled in line by line with the rows filled from left to right.
I have a few columns which I want to ensure are not left blank as this data entry is carried out.
E.g.
Here I am entering data from left to right on the 3rd row and want to ensure that if the person doing the data entry manually accidentally skips the "Unique ID" column and tries to fill in "Type" first, they will be forced back to the "Unique ID" cell or at least experience a pop-up to tell them to enter in "Unique ID" first.
Is this something that can be done?
This can be handled in different ways; one of which is adding a simple data validation rule.
Add a data validation rule to the 2nd cell that checks whether or not the prior field is blank. If so, don't allow entry in the cell and display a pop-up message.
Data validation rules just have to have a a TRUE result.
Add this formula to a custom data validation rule on the 2nd cell.
not(isblank(c7))
Then, if the user tries to populate the 2nd cell while the 1st is still blank, the user gets an alert message and then the cell contents is cleared.
UPDATE #1
If you need to create a dependency for a data validation list you could add a table to a new sheet to act as your list handler. The basic theory is that one column is filled with an index of each row, a 2nd column checks to see if the criteria has been met, a 3rd column contains every item that could appear in the list and a 4th column is a formula that builds the list based on all of the criteria.
Here is a working example. It's a little different than your scenario but it shows the premise. The example below builds a list of items that can only be selected once. Once the item is selected in a cell, it does not appear in the lists for other cells.
t_FinalPlans_Medical is the name of the table.
medicalRow_FinalPlanSelections is a named range containing the cells that have the data validation rules/drop-down lists.
dataValid_FinalMedicalPlans_OptHeading is a named range holding the column header.
INDIRECT("t_FinalPlans_Medical[[#Headers],[Column1]]")
dataValid_FinalMedicalPlans_OptList is a named range for the index column.
INDIRECT("t_FinalPlans_Medical[Index]")
Index Column Formula IF([#[Unselected Plans]]="","",MAX($D$7:D7)+1)
Final Plan Selections Column
Each cell in this column is manually typed.
Unselected Plans Column Formula
IF(COUNTIF(medicalRow_FinalPlanSelections,[#[Final Plan Selections]])=0,[#[Final Plan Selections]],"")
Column1 Formula
IFERROR(INDEX([Unselected Plans],MATCH(ROW()-ROW(t_FinalPlans_Medical[[#Headers],[Column1]]),[Index],0)),"")
Formula used as Data Validation (dynamically expands) OFFSET(dataValid_FinalMedicalPlans_OptHeading,1,0,MAX(dataValid_FinalMedicalPlans_OptList),1)
https://trumpexcel.com/excel-drop-down-list/
I am trying to condense data in a specific way. I want any occurrences of the number 1 in each column to show up as 1 (regardless of how many times it occurs) with the corresponding site, in the corresponding column. Some sites occur multiple times in the original data, and I want to make it so that only one of each unique site shows up in the resulting data table with a 1 for the corresponding column if there any 1's in the column from the original data.
I would think it would be a vlookup function, but I have tried many different things and I am really stuck on this.
Image of original data and what I am trying to do:
Thank you
This assumes that your data set only contains 1 or blank and this approach uses a Pivot Table with MAX function. Below are details in case anyone doesn't know Pivot Tables.
Select a cell in your data and insert Pivot Table. Note, I added a title for column A, as you need that in the Pivot Table.
Click in the created Pivot Table and the PivotTable Fields dialog should pop up. If not, right click in Pivot Table and select Show Field List.
Drag the Field names (Code, a, b,& c) down to the appropriate blocks below. (Values under Columns will be created for you.)
Click on the drop down arrow next to each field name and select Max. That will rename it to "Max of ...". If that bothers you, then you can type the name you want into the Custom Name field. Note, it will not let you type the same name as the field name, eg a, but it will work if you put a space in front of it.
Given that the Pivot Table would be a lot of work for a large number of columns, here is a formula based approach. Put this formula in cell G2, then drag it down and across to fill your new table.
Note, you will have to populate all codes that you have in column F. And if any new codes are added later you will have to keep this updated. One of the advantages of a Pivot Table is that it will do this for you.
I know that you won't be putting this in these cells, so adjust accordingly. In fact, I would recommend this be in another sheet.
=IF(COUNTIFS($A:$A,$F2,B:B,1)>0,1,0)
COUNTIFS($A:$A,$F2,B:B,1)
This will count each occurrence when the value in column A matches your code $F2 AND the value in column B equals 1.
If that count is >0, then you know that at least one match was found and the IF will return 1, otherwise 0.
Is there a way to create an excel template, which automatically applies a formula if a certain column is inserted? The use case would be:
User copies a table from a desktop program (CSV or Tab separated)
Pastes the table into the excel template
Somehow the column's header gets matched (header's name is fixed)
Multiply the column values with a fixed value (like 1.25)
The problem is that the column could be in different indexes and the formula should apply to all the rows, not just fixed ones, but my main problem is how can I get a copy-paste event and find the column.
Edit.: I can only do this with VBA (never used it before)?
Assuming the column header is constant you could insert a table with "dummy" headers and a calculated column using the header name as a reference
In the example I have put a formula in the Calc column. I've put the Calc in column G assuming your maximum import columns are six and because it's good practice to do your calculations from left to right.
You could move the Calc to column A and reduce the "dummy" columns to just 1 with whatever your desired heading is.
To make a template, delete row 3 and clear out the dummy data, just leaving the calculation(s) and save as a .xltx in your profile template folder (wherever that may be in your versions of Windows/Office).
When you paste in your import data the table will extend down and copy the formula(s) automatically. If you have moved your calculation(s) to the left of the table, the table will resize to the right to accommodate all your imported columns.
While the MyHeader column in your template may be over-written, if it can still be found in `Table2[#Headers] the formula will still work.
I am trying to look up the value in one column and pull the number from another column.
Of course, I could use the simple V-lookup or Match.
However, the first column of data has multiple entries that are the same. If I Vlookup it is just going to pull the first number in the second column.
I need to pull each number from the second column and somehow add them together. Despite the fact I have multiple entries.
If there is a way to consolidate the multiple entries in 1st column while also summing up the numbers in the 2nd, that would be great.
I would recommend a Pivot Table. To create one, select a cell in your data range (which needs to have column names in the first row. Choose Insert / Pivot Table from the Ribbon and select the New Worksheet option for the location.
In the Pivot Table list on the new worksheet, drag the name of the first column to the Row Labels box and the name of the second column to the Values box. The name in the Values box should turn to Sum of <2nd column name>.
The Pivot Table will now show a sorted list of the column 1 values and the summed values of column 2. In the example, you'll see that
Does SUMIF do what you are looking for?