CSV formatting based on values - powershell

I have a CSV file as above.
For each value of fruit name I want to check if the "color" and "size" value exists from top to bottom.
If both values exist then I want to copy the same values to the rows below it until I see another value. Once the other value is found then the next empty cells should use the updated value.
Example in the attached image row 2 and 3 will use value from row 1 for color and size columns. Then row 5 will use values from row 4.
The values for color and size should only be copied to the rows below it only after the first value is found. If no value is found then both the color and size column can be empty like the example "grape". How can I do this for all such rows in a CSV file ?

Related

Showing absolute and percentage values in Tableau

I want to show both absolute and percentage value in a single view in the form of a matrix.
In the below view I am trying to add one more column showing values as percentages of total
Got hint here but not able to replicate:Tableau - Both count and Percentage in Measure Values
The data is like this
can any one please suggest!
Not that difficult. I recreated a data like yours,
Follow these steps
Add slide on rows
Add number of records in text on marks card
Add table calculation on this field -> percent of total. The view will look like this
Notice a small triangle in 'no of records' field. That indicates that it is table calculation
Add number of records field once again to text. (Tip: Double click the field number of records to add it to view directly)
Reorder as you like
or with totals

Use every single individual value from column in Tableau

I have a column known as "Gender" that has values 1 = Male and 2 = Female.
Each column has a corresponding value next to it, as follows:
Gender Value
1 500
2 300
1 300
2 400
and so on.
I want to plot this (with each individual value) on a tableau sheet but if I put either of these measures it just SUMs it up by default. Is there a way to plot it like a normal graph with say one attribute as row and the other as column?
Drag Gender to the dimensions section of the data pane (left margin). You might also want to right click on it and edit the aliases.
If you don't want aggregate values in your viz, you can turn that off with the Analysis menu

change column letter in formula with drag down

This is the formula
=SUM(Sheet2!A2:A10)
What i've been trying to do is as I drag down the column to have the formula change to =SUM(Sheet2!B2:B10) and so on.
Basically is what happens we drag to the right we get an increment on the column letter, but I want it when I drag down
For a limited number of rows, the formula below in Row2 and copied down should work:
=SUM(INDIRECT("Sheet2!"&CHAR(64+ROW())&"2:"&CHAR(64+ROW())&10))
Beyond 26 rows I would suggest switching to using a helper column instead of creating teh character value from the row number.

How to keep the line row for repeating values in iReport 2.0.2?

In my table I have repeating value.
I have put isPrintRepeatedValues=false to avoid the repeat values. It was success but I found that the left border is missing for the left cell in a row.
How to make to cover his line for a repeat row only?
The result would be as at the picture (highlighting area) below:

How do i edit my uitable property?

I have a figure of uitable. I have 4 row and 3 columns.When i go to the property inspector, i cant delete row number 4. How can i delete row number 4?
In the help to UITABLE PROPERTIES, it says:
The number of columns in the table is the larger of ColumnName and the
number of columns in the Data property
matrix or cell array.
The same applies to rows.
If you use the default row and column names ('numbered'), the easiest way to get your table to be the right size is to define an defaultData in the command window that has the correct number of rows/columns (in your case, defaultData = zeros(3,3), and set data property to that value.