OpenOffice Calc complex functions - openoffice-calc

I'm wanting to set up a Calc sheet that will offer me stock reorder points on items that sell at a fast rate. In other words, using =Wanted In Stock # - (cell quantity) lets me know if I need to reorder the item or not. I have set up an example of this to further explain what I'm looking for.
The cells in Red tell me how many I need to order to maintain stock on hand wanted. Cells in Yellow show me I have plenty of stock in store, thus nothing to order.
The Yellow cells are just used for show and do not need anything else. The Red cells are what I'm wanting to get complex functions/formulas for. I'm wanting to do 3 things, if at all possible:
Have the Reorder columns hidden unless the item needs to be ordered. Though this isn't essential if it cannot be done
When items need to be reordered, have the column cell show with order count and have red background. Again not essential if cannot be done
Once finished with inventory on hand and reorder cells showing, then I would like a formula to print off a sheet showing the color, item # (306, 1041, etc), order quantity with red background. Those not needing to be reordered wouldn't appear on final order sheet. This on the other hand is really what I'm looking for
Is this at all possible? Or does anyone have a better suggestion?

It sounds like this report is what you are looking for:
To do this, first arrange the data into a single table:
Then select the table (cells A1 to D9) and go to Data -> Pivot Table -> Create, pressing OK to use the current selection. Drag "Color" to Row Fields, "Item" to Column Fields, and "Reorder" to Data Fields. (For LibreOffice, if it says "Data" under Column Fields, select it and press the Delete key to remove it.) Expand "More" ("Options" in LibreOffice), uncheck Total Columns and Total Rows. Then Press OK.
To hide everything that doesn't need to be reordered, right-click on the cell that says "Sum - Reorder" and choose Filter.... Under Field Name select "Reorder". Under Condition select ">", and set value to 0. Then press OK.
To practice using pivot tables, there is an example at http://dwmallisk.blogspot.com/2015/01/using-libreoffice-calc-to-create-pivot.html.
For more complex reports, it might be helpful to link your spreadsheet to the Base component of OpenOffice.

Related

Power Bi dealing with repeated instruments from REDCap

I have data like this:
It comes from REDCap, and as you may be able to tell, the data in the far right columns are repeated variables about each "protocol_title" (the far left column). I.e. "Love it" and "I want a disc instead" are both about "study 2"
I've imported the data into Power Bi and currently I have this:
What I'd like is for the top left visual to only have one row per study (with columns such as principal investigator and method of image transfer, i.e. columns that had data in the first row) and a visual on the lower left with all the right-most columns.
By switching the top visual from a table to a matrix I can kinda accomplish this:
But it adds a bunch of unnecessary columns. As an alternative I thought I could add a filter to the top visual that would filter to "redcap_event_name"=="protocol_information" which would only be those top rows.... but given the visuals are linked, if I do that it removes everything from the bottom visual. I'd like to keep the link between the visuals so that if I select "study2" in the top visual, it'll highlight relevant study 2 information in the bottom one.
So my question is: what's the best approach for making the visuals I want? Are there special settings for visuals? Do I need to do something to the data first in the query? How should I go about this?
You might want to rework you data structure. At first glance, your flat source table could be parsed into two tables :
Protocol
Survey
This can be done in PowerQuery.
For Protocol :
Select columns A to R.
Filter on redcap_event (?) starts by "protocol_info"
Delete empty rows
For Survey
Select columns A (to keep the protocol ID and be able to link both tables), T and U.
Filter on redcap_event (?) starts by "survey"
Delete empty rows.
You should end up with the two table with a one-to-many relationship between Protocol[Protocol_ID] (column A) and Survey[Protocol_ID] (same)
And it should make everything much easier: visuals, calculations...

Sorting Virtual/Created Column in Interactive Grid

I'm not quite sure whether the description for the column I'm working on is proper, so bear with me.
I got an Interactive Grid that I'm adapting, and it's supposed to work such as this:
It should select a name on the first column (an autocomplete field), followed by 3 columns, each with a checkbox. I need to order the data in the grid by the name in the first column. Problem is, I can't use an "order by" in the select statement, so I need to use APEX's "Column sorting".
The column for the name, however, isn't shown in the list to select the order by value. I only get the 3 checkboxes as an option to order it.
I tried having a copy of the name column, but this time, hidden (and not an autocomplete field), but it doesn't work either. Is there a workaround for this?
The IG will only allow you to sort by columns that have been enabled for sorting. By default, only columns of certain data types and maximum lengths are enabled for sorting, but you can override this for each column in your IG definition.

Is there a way that POWERBI does not agregate all numeric data?

so, I got 3 xlsx full of data already treated, so I pretty much just got to display the data using the graphs. The problem seems to be, that Powerbi aggregates all numeric data (using: count, sum, etc.) In their community they suggest to create new measures, the thing is, in that case I HAVE TO CREATE A LOT OF MEASURES...Also, I tried to convert the data to text and even so, Powerbi counts it!!!
any help, pls?
There are several ways to tackle this:
When you pull a field into the field well for a visualisation, you can click the drop down in the field well and select "Don't summarize"
in the data model, select the column and on the ribbon select "don't summarize" as the summarization option in the Properties group.
The screenshot shows the field well option on the left and the data model options on the right, one for a numeric and one for a text field.
And, yes, you never want to use the implicit measures, i.e. the automatic calculations that Power BI creates. If you want to keep on top of what is being calculated, create your own measures, and yes, there will be many.
Edit: If by "aggregating" you are referring to the fact that text values will be grouped in a table (you don't see any duplicates), then you need to add a column with unique values to the table so all the duplicates of the text values show up. This can be done in the data source by adding an Index column, then using that Index column in the table and setting it to a very narrow with to make it invisible.

Conditional/cascading/dependent drop-down list

I am essentially trying to do that this guy is trying to do:
Excel drop-down list using vLookup
I've gone through the steps and since my data set has about 400 different drop down options I am hoping there is an easier way than naming ranges. I have a list of about 400 different account names. Each of these account names is tied to a household and identified by the household ID number. A household can have anywhere from 1-5 account names. I would like for my drop down menu to be able to identify a household ID number and then provide the drop down with the account names associated with it.
Example:
Where household Id number is the identifier.
I've gone here as well http://sites.madrocketscientist.com/jerrybeaucaires-excelassistant/data-validation/dynamic-indirect and am trying to find a way to save on some of the manual work.I am a total newbie so thank you in advance for any help you can provide.
Let's pretend you have three worksheets. The first worksheet, Sheet1, is the sheet that your users will be looking at and it has the drop down lists. We'll say that the cell containing the first drop down option is in B1 (the one with about 400 different options) and the cell containing the dependent drop down is in B2:
On your second sheet, which we'll call MasterList, is all of the data options and the corresponding data. Row 1 is a header row; Row 2 and down is the actual data:
On your third sheet, which we'll call DropDownLists, is where the magic happens. It first needs to have a list of all the unique data options. I've put that in column A. You can get the unique data options from your master list through whatever means you prefer (Advanced Filter, Pivot Table, formula, VBA, etc). That list of unique data options is the basis of your drop down list for Sheet1 cell B1. Then in cell B2 of DropDownLists and copied down as far as needed to guarantee it will grab all data associated with the selected Data Option, use this formula (adjust sheet names and ranges to suit your actual data):
=IF(OR(Sheet1!$B$1="",ROW(B1)>COUNTIF(MasterList!$A$2:$A$10000,Sheet1!$B$1)),"",INDEX(MasterList!$B$2:$B$10000,MATCH(1,INDEX((MasterList!$A$2:$A$10000=Sheet1!$B$1)*(COUNTIF(B$1:B1,MasterList!$B$2:$B$10000)=0),),0)))
This makes your DropDownLists sheet look like this:
Lastly, we need to make that list (data based on the selected Data Option) a dynamic named range. I named it listFilteredData and defined it with this formula:
=DropDownLists!$B$2:INDEX(DropDownLists!$B:$B,MAX(2,ROWS(DropDownLists!$B:$B)-COUNTBLANK(DropDownLists!$B:$B)))
Then for Sheet1 cell B2, use Data Validation and define the list with =listFilteredData and you will get results as shown in my example.
Practice with this.....it will get what you need.
Your data will have to sorted for this to work.
Sorted Data
Data Validation for Shows
Data Validation for Episodes
This formula in the data validation box
=OFFSET($A$1,MATCH($E$4,$A:$A,0)-1,1,COUNTIF($A:$A,$E$4),1)
Enter the array formula to find the Duration
Must be confirmed with Ctrl & Shift & Enter
=INDEX($C$4:$C$18,MATCH(1,(E4=$A$4:$A$18)*(F4=$B$4:$B$18),0))

How to add rows that include formula in spreadsheet?

I am working with a spreadsheet in OpenOffice. This spreadsheet already has the
formulas for each row. I need to add additional rows to this spreadsheet, but don't
know how to do so in order that it copys the formula but applies it to that row.
For example, each row has 8 columns (A-H), and there are formulas in D,F,G,and H. The formulas apply to each row, for example the last row on the sheet is the 6th row, so the formulas read like: =+B6*C6, =+E6*B6, etc.
Lets say I need to add a 7th row that utilizes the same formulas, but don't want to have to manually enter it for each new row so that it applies (for example: =+B7*C7, etc) How would I accomplish this?
Normal copy and paste will do that. That's the beauty of a spreadsheet. Although the formula looks like it says "B6" it is actually stored internally as something like "three cells to the left" so when you copy it to the row below, it is still "three cells to the left" only it appears as B7.
You can also select (click) the cell with the formula, then drag the little black square in the bottom right hand corner of your selection, down to repeat however many times you need it to.
I found a way.
Select the entire row (clicking on the row number), hold Ctrl+Alt and drag the row to the line below. It will copy+insert the row.
You can also copy the entire row and "paste special" (Ctrl+Shift+V) selecting the option to shift the cells down
I just didn't find a way to insert many rows at once with the data.
(I now it´s an old post, but it´s to help people looking on Google)
Excel tables auto fill formulas as new rows are added.
As easy as it sounds to copy/fill formulas down, it is usually beyond a users ability to either comprehend or remember to do the fill. OpenOffice/libre office, etc., needs to be able to do so.
Although new rows with copied formulas can be inserted anywhere for any reason, these instructions assume that you have spreadsheet with many data rows. And above is/are header rows. And below is/are total rows. And it is your desire to add a row to the bottom of the data rows (immediately above the total rows) and that the data rows contain formulas you would like to copy. And the new data row is to applied to the total below.
The first time you do it... not so easy... After that... two clicks...
Select the row with the formulas by clicking the row number (the last data row).
Copy the row (Ctrl+C).
Press the down arrow (now on footer row possibly containing summation formulas).
Begin a special paste operation (Ctrl+Shift+V).
Change the "selection" check marks so that only "Formulas" is selected.
Chose "Down" in "Shift Cells".
Hit "OK" (or press Return) to inset the row.
Edit the summation formula (F2) and make sure the summation range is still correct. If it is not, then you can manually fix the range, but you really need to change the following LibreOffice setting:
Choose menu option "Tools" (Alt-T).
Choose "Options" (O) in the "Tools" menu.
Expand "LibreOffice Calc" (Hit the disclosure triangle there).
Select "General" in the "LibreOffice Calc" expansion list.
Put a checkmark in (click) the "Expand references when new columns/rows are inserted"
Now that you have the row in the copy buffer and proper setup is complete, you only need to be on the first footer row, press Ctrl+Shift+V and hit Return.