Different sheet references in an "OFFSET(INDIRECT(ADDRESS(MATCH))) array for a Vlookup - match

I have two worksheets, called "Holdings" (main one) and "Prove" (second one).
I am currently experiencing an issue with a Vlookup with a variable array.
I have a variable data set, which can freely expand rows-wise, but keeps a standard layout columns-wise.
In order to tell the vlookup which values to fetch from the table, I wrote down their list, next to the vlookup formula.
I am able to fetch the correct values if I apply the formula in the main sheet, but when I type it in the second one, adding "Holdings!" before references, it turns out #N/D.
Can someone please help me?

Related

Multiple copies of a record based on formula

Good afternoon,
I am very new to Crystal Reports, so am not sure where to look for this information and would appreciate if someone can point me in the right direction or tell me if what I am asking for is impossible.
One of our departments uses a field called RecordChanges to note changes made to a record. The field is text and the department stores information there about the date a change is made and the type of change, separated by commas (i know this is terribly inefficient, but it's what I have to work with). I have a Crystal Report that parses this text field and picks up the latest date and latest change made to the record. I would like to modify this report to include ALL the changes made to the record, so if the field RecordChanges of the data source has 3 dates, I would like this record to appear in my Crystal Report 3 times, once for each change that was made. How to parse the field I can figure out but where I'm stuck is how do I make the number of times a record appears equal to the number of dates found which is my {#DateFound} field?
There is a lack of details, but as far as I understood the problem and assuming that you did state in the comment that "there wouldn't ever be more than 5 changes to an order", here is a first try to tackle the situation.
I will assume that you already have a formula that "parses this text field and picks up the latest date and latest change made to the record". And that you know how to adjust this formula to pick up each of the record changes. I will name this formula as {#Parser1}.
Based on {#Parser1}, create other 4 formulas: {#Parser2}, {#Parser3}, {#Parser4}, {#Parser5}. As you probably presume, each formula must be changed to parser the Nth occurrence of the record change.
Create 5 details sections.
Put each formula in each detail section.
Suppress the detail section wich formula is null or empty.
That's it.
The limitation is that you can have at most 5 record changes.
This is an awkward solution, but it is necessary (as far as I know) since Crystal Reports works based on your data rows. It iterates over the rows, but cannot "generate" more rows by itself. If you can manipulate the data source, you can create other solutions.
You still need to do the magic trick to pickup the Nth change from the text.

Repeating a result on a line on the rows/lines below untill that result changes?

Image showing problem
I want to know if there is a way of repeating the result of a column downwards until the change of result.
Attached image shows the problem.
I need 9.1stWC column to fill the number(which is actually a string) all the way down until that number changes.
The column is not null where the blank fields are (9.is null, shows this) so I'm going to have to write additional formulas to show I'm guessing.
I've used previous function but that only shows for the next line down then is blank after.
The replicate string function will go across the column not downwards.
I've looked at a stringVar but cant find a way of making this work on this report.
I'm reserved about grouping as I have a lot of other filters and by grouping I could possibly loose the sequence depending on what I group by.
My aim is to show WC which are equal to the current op line by doing a simple formula after I have managed to populate that column
I will assume your column is a field named {Result.WC}.
Try this:
Create a formula. Let's call it #LastWC.
Use this code in the formula:
shared stringvar sharedLastWC;
if not isnull({Result.WC}) and {Result.WC} <> "" then sharedLastWC := {Result.WC};
sharedLastWC; //returns
Replace the field by the formula.
The idea behind this is to set the shared variable when the field is not blank and not null. So, the variable will hold the last "filled" value.
I can't make a test with the purposed solution right now, but give it a try and make adjusts if you need. Tell me if it does not work.
If the first row can be empty, you may need to create an aditional formula do start the value of the shared variable in the header of the report.

SSRS Aggreation on Calculated Field

I am trying to perform an aggregation on a calculated Field in SSRS and am getting the following error:
[rsAggregateReportItemInBody] The Value expression for the textrun 'Textbox43.Paragraphs[0].TextRuns[0]' uses an aggregate function on a report item. Aggregate functions can be used only on report items contained in page headers and footers
This is the formula I tried to use:
=Sum(ReportItems!PlanPurchPrice.Value, "Select_UCPUtilization")
In this Case PlanPurcPrice is also an Expression:
=First(Fields!PawPlanPurchPrice.Value, "Select_UCPUtilization")
Any suggestions on this would be greatly appreciated.
SSRS 2008 does not support the functionality you are looking for unless the report item is located in the header or footer (as is stated in the error message). I would, instead, propose two alternate solutions:
First Option
Place the calculation in your query (if possible) at which point you can then reference the field and the aggregate will work as desired.
Second Option
You essentially want to create the aggregate you're looking to return elsewhere in the report where it is directly connected to the Select_UCPUtilization scope, then reference the aggregated value elsewhere. Follow these steps:
Within the same scope as report item PlanPurchPrice, calculate a sum of the PlanPurchPrice. Name the textbox containing the aggregate something meaningful (e.g., Sum_PlanPurchPrice).
Reference that textbox directly wherever you were trying to use the ReportItems sum before (i.e., =ReportItems!Sum_PlanPurchPrice.Value)
Hide the workaround. Place the aggregate you created in an additional column or row attached to the Select_UCPUtilization scope. Turn the text white, turn off growth and shrinkage, and make the row very tiny (a pixel or two high).
Using the second option, the report item does exist (and is visible, which is important) on the report and contains the sum you are looking to return elsewhere.
Hope this helps. if this doesn't make sense, please reply via comment and I'll help you to the best of my ability.

Libreoffice Calc reference cell with a specific progression

I have a collumn with this contend inside:
=sheet1.F8
=sheet1.F15
=sheet1.F22
Normally in the excel I select the three cells and pull down, excel understand the logic and the next cell above will be "sheet1.F29". But if I do this in Libreoffice it puts "sheet1.F11".
Do you have any idea of how to do this ? (I have several sheets like this logic and I'd like to use Libreoffice instead Excel).
I found a workaround and replying here:
It is setting the reference to “F11” because the first row contains a reference to F8 and the new entry is 3 rows beneath this i.e., the offset is based on the first cell of the selection, thus 8+3=11. A workaround is to use the addresses of the destination and combine this with the INDIRECT() function. For example, create a separate column with “Sheet1.F8”, “Sheet1.F15”, and Sheet1.F22” etc. Highlight and drag this column of values to obtain a column of correct address references. Then adjacent to this use (given “Sheet1.F8” in sheet 2 cell A1) =INDIRECT(A1) in B1. Now drag this down the B column to obtain the required values.

Previous function, but for two (or more) rows previous

I'd like to get the value of a cell, two rows previous, is that possible?
I know I can do the row previous, but I'd like two (or more) rows previous
Previous({myTable.myColumn})
Not with any standard functionality that I'm aware of.
Off the top of my head, though, you could try shared variables.
For example, you could have PrevRecord1 and PrevRecord2 variables. A function that is in the detail row of the report would then update PrevRecord2 with PrevRecord1, and then update PrevRecord1 with Previous({myTable.myColumn}).
The obvious downside to this solution is you'll need a variable for each row you want to go back.
Per answer on crystalreportsbook.com
Crystal is limited to only one record previous and one record after (next).