Question: I'm pretty new to SSRS, may not be possible, but can I have a WHERE clause written in an expression?

I bassically have a dataset, but only want to assign the value to a text box based on the values in the dataset.

In linq, it'd look like:

`ds.FirstOrDefault(x => x.IsHeader)` but I can't work out the expression syntax. There is the First function, but that just gives me the first record - not filtered as its applied after the filters. 

Anyone have any ideas - otherwise I need to split my dataset into multiple datasets, which is not ideal

Thanks in advance

Answer: 
You can do filtering in the First Expression like so:

```
=First(Fields!MiddleInitial.Value = "P")
=First(Fields!MiddleInitial.Value = Parameters!MiddleInitial.Value(0))
=First(Fields!MiddleInitial.Value,"AdventureWorks")

```

So for your example you'd have an expression that looks something like this (assuming your textbox is bound to `ds`):

```
=First(Fields!IsHeader.Value = True)

```

If the textbox isn't bound to `ds` you should be able to do this:

```
=First(Fields!IsHeader.Value = True, "ds")

```
it's best to do filtering in your SQL query.
You can set up a parameter in your dataset to properly display the data you want.