Click here to Skip to main content
16,017,788 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I am new to SSRS. I have to write an expression like this in ssrs.

If sum((A/B))=0 then display sum(((A/B)-1))=0 else display sum(((A/B)-1)).

I have tried this
1. =sum(case when (A/B)=0 then ((A/B)-1)*0 else ((A/B)-1) end)
2. =sum(case when (A/B)=0 then ((A/B)-1)=0
when (A/B)<>0 then (A/B)-1) end)
In both the cases I am getting a red line under the case showing it was an "unrecognised identifier". Is there any other way to do this ???
Pls help.
Posted
Updated 12-Dec-12 20:13pm
v2

Hi,

The following will solve your problem,

=String.Format("Model: {0}",IIF(Parameters!pVINModel.Value <> "All", IIF(Parameters!pVINModel.Value = "K13","Model-K13-K",IIF(Parameters!pVINModel.Value = "D10","Model-D10-D","Nissan Sunny")),"All"))
 
Share this answer
 
Comments
Dhivya.J 13-Dec-12 6:24am    
Thank you
The solution is

sum(IIF( (A/B)=0, (A/B)-1)*0, ((A/B)-1) ))
This expression satisfied my condition.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900