我想在中做一个跨合并的计数。我有两个不同的数据集,它们在维度"SID“上合并。一个数据源将是外部查询的源,称为“Contact”,它有以下列:
另一个被称为“事件”的数据源有以下列:
我想在Webi中创建一个基于“联系人”数据源(可能使用merge,detail变量)的报告,其中包含以下列:
Incidents.SID = Contacts.SID.Incident Date<=(Contact.Contact Date+7) Incidents.Incident Date>=Contact.Contact日期
有什么想法吗?我一直试图在哪里使用count()执行一个详细变量,但这似乎不起作用。我正在使用BI平台4.2,Webi。我已经研究了很多网站之外的堆栈溢出,如变量以计数合并的维度和webi报表中的计数公式。
我还看过这两篇堆栈溢出文章,按单元格引用的业务对象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发布于 2017-11-13 16:53:28
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
https://stackoverflow.com/questions/47205374
复制相似问题