Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 SUM IIf

Author  Topic 

Plaice
Starting Member

20 Posts

Posted - 2010-06-21 : 09:41:33
Can someone explain why this wouldn't work:

=(SUM(IIf(Fields!currency.Value = "USD ",Fields!price.Value / 1.6, IIf(Fields!currency.Value = "UKST",Fields!price.Value / 1, IIf(Fields!currency.Value = "EURO",Fields!price.Value / 1.18,"")))))
If I put it in a table where the dataset is specified then the SUM part of the statement isn't applied and I get a list of values. If I use the expression in a textbox and specify the dataset in the expression then I get an error.

Done numerous searches and from what I can find this *should* work.
   

- Advertisement -