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

Comparing row columns to identify max and min across the entire dataset

$
0
0

Hi All,

I have a task that requires me to sum the total of all the columns for each row in a data set. I then take this information and I store it against a Max and Min Field, as well as storing the actual count for that row. I need to apply the lowest and highest values by keeping the Max and Min total to compare to the rest of the data and at any time the Max and Min will go up or down. I need to show this... (i hope I've made sense)

If my values are:

10, 25, 15 then Actual=50, Max=50, Min=50

22, 30, 15 then Actual=67, Max=67, Min=50

25, 35, 30 then Actual=90, Max=90,Min=50

20, 20, 20 then Actual=60, Max=90,Min=50

5, 5, 3       then Actual=13, Max=90,Min=13

I need to know the max or min increases or drops per line. If it doesn't, then the current Max and Min will remain and as things change then the max may go up or the min may go down.

Any advice on how to do this using an expression? Here is my attempt....

MIN

=iif(Previous(Fields!Total.Value) < (Fields!Total.Value),Previous(Fields!Total.Value),Fields!Total.Value)

MAX

=iif(Previous(Fields!Total.Value) > (Fields!Total.Value),Previous(Fields!Total.Value),Fields!Total.Value)


Viewing all articles
Browse latest Browse all 10045

Trending Articles



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