Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Cant get my SUM IIF statements to work with multiple criteria

$
0
0

Hi,

I have written an expression within SSRS and it doesnt error - which is a good thing, but doesnt give me a value either so I am bamboozled as to why.

My Expression looks at 2 columns, if they are equal to the detail in the expression it should sum the value of the quantity field. Running the report without the expression shows the criteria is in both of the columns on multiple lines with multiple quantities - Product Name "Boat" and users_text04.Value "10" as below

SQL
=Sum(VAL(IIF((Fields!ProductName.Value="BOAT"AndFields!users_text04.Value="10"),Fields!PAL_oqty.Value,0)))

I have juggled with the expression in various ways with no success so I ask the experts :)

Thanks!


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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