Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

How to get the MAX of a field in a dataset into a parameter? - Aggregate functions cannot be used in calculated field expressions

$
0
0

Hi

My dataset is getting its data from a SPROC.
It delivers data which shows as several rows in a table.
One of the fields is orderdate.
I would like to get the MAX orderdate of the data which is returned from the query.
I would like to get this MAX value as a default value in a parameter.
I thought I could do this by adding a calculated field to the dataset.
I have thus added the calculated field MaxDate which have the expression =Max(Fields!orderdate.Value)


But I get the error:
"Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions."

What shall I do to be able to extract the MAX orderdate from the data which is returned in my dataset and get it as a default value in a parameter?



Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>