[英]SSRS Report Builder - Get the date time when the data in the table is updated?
[英]SSRS Report Builder - How to calculate the date diff and add IFF statement between 2 data sets
我正在嘗試計算 2 個數據集之間的天數差異,然后如果該值介於 1 到 2 天之間,那么如果該值是負數或大於 2 天,它應該顯示合規我希望它顯示不合規。 我不確定我有什么問題,它運行但是它們都顯示合規
所需計算的背景。 IMM 出院合規性 - 醫院必須在出院前不超過兩 (2) 天向每位受益人提供一份已簽署的通知副本。 如果初始 IM 在出院后兩 (2) 個日歷日內交付,則不需要后續通知。
僅供參考 - 第一個 IFF 聲明是因為有些沒有日期,所以這是為了說明那些
=IIF(
IsNothing(Lookup(Fields!Account_Number.Value,Fields!Account_Number.Value,Fields!Intervention_Date_Of_Service.Value, "Interventions")),
"No Intervention",
IIF(
DateDiff("d",Fields!Actual_Discharge_Date.Value,Lookup(Fields!Account_Number.Value,Fields!Account_Number.Value,Fields!Intervention_Date_Of_Service.Value, "Interventions")) <=2,
"Compliant",
"Non-compliant")
)
我嘗試了多種變體 =1 或 2 等,如果我只使用 =2,它們都顯示不合規
您有兩個不合規條件 - 差異為負數或大於 2 天,因此您必須檢查這兩個條件。 嘗試這樣的事情:
=IIF(IsNothing(Lookup(Fields!Account_Number.Value, Fields!Account_Number.Value, Fields!Intervention_Date_Of_Service.Value, "Interventions")),
"No Intervention",
IIF(DateDiff(DateInterval.Day, Fields!Actual_Discharge_Date.Value, Lookup(Fields!Account_Number.Value, Fields!Account_Number.Value, Fields!Intervention_Date_Of_Service.Value, "Interventions")) < 1,
"Non-compliant",
IIF(DateDiff(DateInterval.Day, Fields!Actual_Discharge_Date.Value, Lookup(Fields!Account_Number.Value, Fields!Account_Number.Value, Fields!Intervention_Date_Of_Service.Value, "Interventions")) > 2,
"Non-compliant",
"Compliant"
)
)
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.