May 7, 2014 at 2:03 am
Hi Team,
I need some assistance with the following
I have an IIF condition and it is as follows
=round((Sum(Fields!VDuration.Value) + sum(iif(not(Fields!STypeName.Value = "SS") and not(Fields!STypeName.Value = "UA "), Fields!SDuration.Value,0)))/ 60,2)
I want to change the above to as
> If the Stypename.value<> "SS" and Stypename.value <> "UA", then Vduration should not be calculated and the Sduration needs to be half which means sum( Vduration = 0 and Sduration = Sduration/2) ELSE
sum(Vduration+Sduration)
Please note :- both the duration are in minutes, thats why the above script has ROUND condition.
Any help is highly appreciated.
Regards,
Krishna.
May 7, 2014 at 10:18 am
I think this is what you need:
=Round(
(
IIF(Fields!STypeName.Value <> "SS" AND Fields!STypeName.Value <> "UA",
Fields!SDuration.Value/2,
SUM(Fields!VDuration.Value + Fields!SDuration.Value))
/60
)
,2)
This does:
IF Fields!STypeName.Value is not equal to "SS" or "UA" THEN
return ROUND(((Fields!SDuration.Value/2)/60), 2)
ELSE
return ROUND((SUM(Fields!VDuration.Value + Fields!SDuration.Value)/60), 2)
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply