0
votes

I have a parameter for Net Profit target so if i enter 0.10 it =10% my report looks at products that Does not meet the specified target and the last column suggests the minimum retail selling price the product would need to meet the target

to get net profit i use

   (NetRtl-Cost)/NULLIF(GrsRtl,0) as NP 

say the result was 0.04 = 4%

i need the minimum NetRtl to make my NP = 10%

but when i do @NPTARGET + COST * GRSRTL this doesnt work

1
What do you mean "this doesn't work"? The number is wrong? You get an error? Your computer crashes and catches on fire? - TTeeple
You have not provided enough information for anyone to help you. - Tab Alleman
@TTeeple wrong number - Cladback
Some sample data will be helpful. Also, this (NetRtl-Cost)/NULLIF(GrsRtl,0), when GrsRtl is in fact NULL, you are dividing by 0. That is a mathematical no-no and will also error. - TTeeple

1 Answers

0
votes

I think you want something that checks to see if the current margin is less than the parameter and if it's less, calculate a new price:

=IIF(ISNOTHING(FIELDS!GrsRtl.Value), "None Sold", 
 IIF( (FIELDS!NetRtl.Value - FIELDS!Cost.Value) / FIELDS!GrsRtl.Value < Parameters!NPTARGET.Value, FIELDS!Cost.Value * (1.0 + Parameters!NPTARGET.Value), 
 "OK") )