Filtering Expressions in Microsoft Report Builder - expression

My dataset has multiple variables each with different values. I am already filtering in my Datasets and Charts/Tables. I need to be able to filter again in my expression.
I want only the values from one variable. I need to filter out the other variables so I can focus only on the values from one variable.
Value=(Fields!VALUE.Value) when Fields!VARIABLE.Value = "ABCD"
Obviously the logic above does not work but I am looking for something similar that does work.
Value is an integer
Fields!VALUE.Value is an integer
Fields!VARIABLE.Value is a string
ABCD is the variable name I want to get the value from.
For example.
I have two variables ABCD and EFGH. I only want the value from ABCD but not from EFGH. I need to filter out EFGH.

Related

How to use INDEX MATCH in Google Sheets when the two values are formatted differently (text versus numbers)?

I'm trying to match a string of numbers (like 370488004) using the typical INDEX MATCH formula. Unfortunately, in one range the numbers are formatted as plain text, and in the other range they are formatted differently. Usually 'Automatic' or 'Number'. I want to avoid having to update the formatting of both ranges whenever the values get updated (usually via a paste from an outside source). Especially since it's not always going to be me doing the updating.
Is there a way I can write my INDEX MATCH formula so that it ignores the formatting of the values it's attempting to match?
The value returned by the INDEX formula can be in any format. Plain text, number, doesn't matter. The problem is the two values I'm matching are in different formats. I need a formula that ignores that their formatting.
Here's an example sheet:
https://docs.google.com/spreadsheets/d/1cwO7HGtwR4mRnAqcjxqr1qbhGwJHLjBKkp7-iwzkOqY/edit?usp=sharing
You can use VALUE or INT to force it into a number value, or if you want to keep it text use TEXT. Example would be:
=INDEX(VALUE(D1:E4),MATCH(G1,E1:E4,FALSE),1)
The numbers in column D are in fact text, but utilizing VALUE first for the range puts them all in number format. It is finding the value associated with "Green" written in G1. Without seeing a working example sheet this is the best solution I can offer.
UPDATE:
You can use VLOOKUP array with a static range (otherwise error), or QUERY to have the range infinite.
=ARRAYFORMULA(VLOOKUP(VALUE($G3:$G5),$B3:$C,2,FALSE))
=QUERY(FILTER($B3:$C,$B3:$B=VALUE($G3:$G)),"Select Col2")

How do I pass a list of values in string form to viewparams in geoserver?

I have a SQL view which takes two parameters. One of these parameters is a list of numbers in string form.
I can't for the life of me figure out if Geoserver can take this list and parse it.
The basic SQL query i've set up works as below
SELECT * FROM table WHERE id IN '%list%' AND layer = '%layer_name%'
When I put the default value for %list% as "1, 2 ,3" as an example, the call to viewparams might look like this
viewparams=layer_name:'layer_y';ids:1,2,3
Which fails. I've figured out that viewparams uses semicolons to distinguish between parameter types,
and commas as a way to distinguish between viewparams for different layers.
So I need a way of encapsulating my list of id values so that geoserver can parse them correctly.
Does anyone know how to do this?

How to fetch parameters of same array randomly using regular expression in jmeter

Like there are lots of values in array
{"profile":"qa","job":"active","status":"green"}
{"profile":"dba","job":"non-active","status":"yellow"}
So there are multiple rows like this, I want to fetch profile and job of all the arrays randomly and it should be like that, if profile is selected as qa randomly say by regular expression post processor, then job value should also be "active" i.e
Same for dba profile, that if dba is fetched , then job value should be non active
Can this be achieved using regular expression for random fetch??i. giving match no as 0
As you are dealing with JSON responses, hence would recommend you to use JSON extractor post processor as $..['job','profile'] and set Match number to 0. This way you can extract values from array in one go.
You can use this variable name highlighted in subsequent requests like - ${entryJson}
For Regular expression you can use profile": "(.?)" and job": "(.?)"
in two of the expressions but using zero will return different values for each run.

how to apply stringtoword vector filter

I am trying to use the weka gui to classify some textual data.
I am using the stringtoword filter with the attribute indices default value being set to first-last.
However, i tried to change it to things such as 1, 500-last
it gives me an error of invalid range list.
Initially my arff has only 2 attributes.
class
text
Is there anything i am doing wrongly ?
I am pretty sure there are a lot of words in the text file and when i run the default filter of first-last it gives me a whole 10,000 number of attributes
The attribute indices takes index, respectively indices of attributes whose values you wish convert to word vector. So you have two attributes class with index 1 and text with index 2.
Setting first-last takes both and very likely did nothing with class since it is usually single value, and make a word vector from attribute text.
Cut to the chase, your only options in this case is to use 2 or first-last, but result will be the same. 500 is out of range since you have only 2 attributes.
PS. If you wish use just range of words from obtained word vector, you can use Remove filter and specify indices of columns (words) you wish to remove...

vb6 Crystal reports 9? how to simulate formatted string as separate records

Here's another one for ya.
I have a column in a database that consists of a formatted string containing titles and values associated to those titles.
such as: "Genre : Science Fiction Style : Vintage StuffTitle : StuffValue"
parsing the data is no problem.
I do a split on the 3 spaces separating the groups and then another split on the colon (:) to get each title and value.
The problem is I want crystal to see this as a record so I can apply formatting to the section containing the values.
Assign the different pieces to variables in one formula while taking care of your type casting, etc., and then create other formulas that return the value of each of these variables individually (one per piece of data you want to format individually). Then, drop them both in the same report section.
For example, if your parsing formula is {#parse}, and in it
...
numbervar sample := &ltsome parsed value>
stringvar another := &ltsome other value>
...
to return and format the first individually:
evaluateafter({#parse});
stringvar sample

Resources