簡體   English   中英

SSRS表達式問題,帶有)或的問題,

[英]SSRS Expression Issue,problems with a ) or a ,

我的SQL語句:

=IIF
(
  IIF(
   SUM(Fields!EstUnits.Value) <= 0,
   0,
   Sum(Fields!JTDUnits.Value) / 
   IIF
   (
     Sum(Fields!EstUnits.Value)=0,
     1, 
     Sum(Fields!EstUnits.Value)
   )
  )<=0,
  Sum(Fields!PeriodCost.Value) + Sum(Fields!EstCost.Value),
  IIF
  (
    IIF
    (
      SUM(Fields!EstUnits.Value) <= 0,
      0,
      Sum(Fields!JTDUnits.Value) / 
      IIF
      (
        Sum(Fields!EstUnits.Value)=0,1,Sum(Fields!EstUnits.Value)
      )
    )>0.25,
    Sum(Fields!JTDCost.Value)/ Sum(Fields!EstCost.Value),
    Sum(Fields!EstCost.Value)
  )
)

收到錯誤消息:

Argument not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'.

我知道它的a)或,但是我已經嘗試了好幾個小時了,我希望對此有更多的關注。 該語句應評估%如果<=零,則將兩列加在一起;否則,如果%大於25%,則將列除以%,否則=列

當我分解表達式時,會遇到這個問題(我總是將值替換為4 ,將條件替換為b ):

=IIF(4)<=0,4,4)

您必須檢查一下自己,因為我真的不知道如何根據您的結果更正此表達式:

=IIF(
  IIF(
      b,
      0,
      4 / IIF(b,1, 4)
      ) <=0,
          4,
  IIF(
   IIF(
       b,
       0,
       4 / IIF(b,1,4)
       ) >0.25,
             4,
             4
     )
    ) 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM