简体   繁体   English

SSRS报告逻辑SQL服务器

[英]SSRS Reporting Logic sql server

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 我有一个“净利润”目标的参数,因此,如果我输入0.10,它= 10%,我的报告将查看未达到指定目标的产品,最后一栏显示该产品达到目标所需的最低零售价

to get net profit i use 获得我使用的净利润

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

say the result was 0.04 = 4% 说结果是0.04 = 4%

i need the minimum NetRtl to make my NP = 10% 我需要最小的NetRtl才能使我的NP = 10%

but when i do @NPTARGET + COST * GRSRTL this doesnt work 但是当我做@NPTARGET + COST * GRSRTL时这不起作用

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") )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM