我想在Business Objects webi中进行一次跨县域合并。我有两个不同的数据集,它们在 "SID "维度上进行合并。其中一个数据源是外部查询的来源,称为 "联系人",有以下列。
另一个数据源称为 "事件",有以下几列。
我想在Webi中创建一个基于 "联系人 "数据源的报表(可能使用合并、细节变量),其列数如下。
[事件].[SID]=[联系人].[SID]
[事件].[事件日期]<=([联系人].[联系人日期]+7)
[事件].[事件日期]>=[联系].[联系日期]
有什么想法吗?我一直想用count()where做一个细节变量,但是这个好像不行。我使用的是BI平台4.2,Webi。我研究了很多Stack overflow以外的网站,比如说 变量计算 合并尺寸 和 网易报告中的计算公式.
我也看了这两篇堆栈溢出的文章。业务对象CountIf按单元格参考 和 业务对象WEBI在一份报告中包含3个宇宙。. 然而,这些都没有显示如何,至少以我能够理解的方式,如何克服上下文错误,似乎发生在每当我创建细节变量和措施跨越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的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.comquestions352011how-do-i-make-a-countifs-across-business-objects-w.html。