SSRS IIF question with 2 conditions in 1 expression
Hi Could I get some help with the below please, I'm sure it's a case of not putting the arguements in correctly and will be simple for some! My SSRS IIF expression The below returns a decent amount of data but not what I want; =(count(iif(Fields!ID__Remaining.Value > "0.99", 1, nothing))) I basically need it to filter and return a count of 1 where the ID__Remaining column has a value of 0.99 through to 90.00 I've tried a few variations of the code but just can't crack it! I imagine it could be something like the below but SSRS just throws errors as usual =(count(iif(Fields!ID__Remaining.Value > "0.99")Fields!ID__Remaining.Value < "90.00" , 1, nothing))) Any help appreciated, thanks.
July 17th, 2012 11:54am

Hi MJ2012, I dont know your need of using the Count() but here you go: =Count(iif(Fields!ID__Remaining.Value > "0.99", 1, iif(Fields!ID__Remaining.Value < "90.00", 1, Nothing))) Thanks, Khilit
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2012 12:27pm

Hi and thanks for your response, that hasn't worked though it's giving me a total count. I probably didn't make myself too clear to begin with. Basically I have a table returned and then a small table next to the report that is doing counts based on certain conditions, and in this case 1 unit for everytime >0.99 or <90.00 is returned in the ID__Remaining column. The code provided returns 879 in the SSRS cell which the total column also has so there's something that needs amending slightly. As an example in my total column I simply have ; =(COUNT(IIF(Fields!ID__InStock.Value=100.00,1,nothing))) which works fine and returns 879 so I need the above code changed to work in my cell titled Between 1% and 90% Thanks :)
July 18th, 2012 4:12am

Finally managed to crack it with some more research and your help, If anyone ever needs help here is the code; Just amend what I have put in bold below =COUNT(iif((Fields!COLUMN.Value > "EDIT") And (Fields!COLUMN.Value < "EDIT") , TRUE, FALSE))
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 4:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics