【问题标题】:Countifs across BO Webi merge like correlated subquery跨 BO Webi 的计数像相关子查询一样合并
【发布时间】:2017-11-09 15:16:10
【问题描述】:

我想对 Business Objects webi 中的合并进行计数。我有两个不同的数据集,它们在维度“SID”上合并。一个数据源将成为外部查询的源,称为“联系人”,它具有以下列:

  • SID(编号、尺寸)
  • 联系日期(日期、维度)
  • 联系人类型(字符串、维度)

另一个数据源,称为“事件”,具有以下列:

  • SID(编号、尺寸)
  • 事件日期(日期、维度)

我想在 Webi 中基于“联系人”数据源(可能使用合并、详细变量)创建一个包含以下列的报告:

  • SID(编号、尺寸)
  • 联系日期(日期、维度)
  • 联系人类型(字符串、维度)
  • 受影响的事件VARIABLE 计数“事件”中的记录,其中满足以下条件:)

[事件].[SID] = [联系人].[SID]

[事件].[事件日期]

[事件].[事件日期]>=[联系方式].[联系日期]

有什么想法吗?我一直在尝试用 count() where 做一个细节变量,但这似乎不起作用。我正在使用 BI 平台 4.2,Webi。我研究过很多 Stack Overflow 外部的网站,比如Variable to count Merged dimensionscount formula in webi report

我也看过这两个堆栈溢出文章,Business Objects CountIf by cell referenceBusiness Objects WEBI 3 universes in one report。但是,这些都没有显示如何(至少以我能够理解的方式)克服在跨 SID 合并创建详细变量和度量时似乎发生的上下文错误。

以下是两个数据源的外观,以及报告中所需的输出:

CONTACTS
SID     Contact Date     Contact Type
1        8/1/2017        ONB
1        8/15/2017       SCB
2        8/14/2017       ONB
3        8/19/2017       ONB
4        9/1/2017        SCB

INCIDENTS
SID     Incident Date
1       8/1/2017
1       8/7/2017
1       8/9/2017
1       8/21/2017
1       9/1/2017
1       10/1/2017
2       8/15/2017
4       9/2/2017

**DESIRED OUTPUT ON REPORT
SID     Contact Date     Contact Type     Incidents Influenced
1        8/1/2017        ONB               2
1        8/15/2017       SCB               1
2        8/14/2017       ONB               1
3        8/19/2017       ONB               0
4        9/1/2017        SCB               1

【问题讨论】:

    标签: sap business-objects webi


    【解决方案1】:

    SAP 的 Amit Kumar 回答了我的问题。这是他提供的解决方案。

    Merge the SID objects and drag in the final table.
    
    Drag Contact Date & Contact Type objects in the final table.
    
    Create detail variable for Contact date as "V Contact Date" and for Incident date as "V Incident Date".
    
    Right click on the table->Format table-> checked the checkbox "Show rows with empty dimensions"
    
    Drag below formula for calculated column and see.
    
    =Sum(If([V Incident Date]<=RelativeDate([ V Contact Date];7) And ([V Incident Date]>=[ V Contact Date])) Then 1 Else 0)
    

    https://answers.sap.com/questions/352011/how-do-i-make-a-countifs-across-business-objects-w.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多