[英]Mondrian Schema - Calculated Member dimension lookup
I am hoping someone can help me with my latest hickup in design my mondrian schema. 我希望有人可以在设计蒙德里安架构时为我提供最新的参考。 I use Mondrian 4, Pentaho along with Saiku analytics 3.7.
我将Mondrian 4,Pentaho和Saiku Analytics 3.7一起使用。
I am designing a performance metric system based on different KPI's which seems to be working fine. 我正在设计一个基于不同KPI的性能指标系统,这似乎很好。 My problem is calculating ratio values in the mondrian schema where I need to lookup a specific dimension and then return the appropriate measure value for a given KPI calculation
我的问题是在mondrian模式中计算比率值,我需要查找特定维度,然后为给定的KPI计算返回适当的度量值
<CalculatedMember name="Actual Performance" dimension="Measures">
<Formula>IIF([Performance].currentmember.name = 'Occupancy',
([Performance].currentmember.prevMember ,[Measures].[Actual Performance1])
, [Measures].[Actual Performance1])</Formula>
<CalculatedMemberProperty name="FORMAT_STRING" value="#,###"/>
<CalculatedMemberProperty name="DATATYPE" value="Numeric"/>
</CalculatedMember>
My question is this: 我的问题是这样的:
For the line of code above: 对于上面的代码行:
([Performance].currentmember.prevMember ,[Measures].[Actual Performance1]) ([Performance] .currentmember.prevMember,[Measures]。[Actual Performance1])
How do I change or specify the (dimension) Performance Metric "Connected Time" to return the "Actual Performance" measure value instead of using the previous member/value? 如何更改或指定“维度”绩效指标“连接时间”以返回“实际绩效”度量值,而不使用先前的成员/值?
In pseudocode I want this: 用伪代码,我想要这样:
a) find dimension "Connected Time" a)查找维度“连接时间”
b) return the [Measures].[Actual Performance1] value for the "Connected Time" dimension b)返回“连接时间”维度的[Measures]。[Actual Performance1]值
I actually need to calculate the ratio "Occupancy" As "Total Call Time" divided by "Connected Time" but just need a start for the dimension lookup. 我实际上需要将“占用率”的比率计算为“总通话时间”除以“连接时间”,但是只需要开始进行维度查找即可。
Currently my line of code returns the previous member value as per the screenshot so I am guessing I am sort of on the righ track but stuck now as I am still learning Mondrian. 目前,我的代码行根据屏幕截图返回了以前的成员值,所以我猜我有点偏僻,但由于我仍在学习蒙德里安,所以现在卡住了。 I have lots of these KPI's that needs to be calculated this way.
我有很多这些KPI都需要用这种方法来计算。
I need to find a method of calculating the KPI ratios this way so cannot change the star schema the performance metric system is a complete balance scorecard approach for a call centre and works nicely except for getting the ratios calculated correctly. 我需要找到一种以这种方式计算KPI比率的方法,以便不能更改星形方案。性能指标系统是呼叫中心的完整平衡计分卡方法,除了可以正确计算比率外,它还可以很好地工作。
Okay I have found a way to do this after a long struggle. 好的,经过长时间的努力,我找到了一种方法。
<CalculatedMember name="Actual Performance" dimension="Measures">
<Formula>
IIF
(
[Performance].currentmember.name = 'Occupancy',
(
([Performance].[Total Call Time] ,[Measures].[Actual Performance1]) / ([Performance].[Connected Time] ,[Measures].[Actual Performance1]) * 100
),
[Measures].[Actual Performance1]
)
</Formula>
<CalculatedMemberProperty name="FORMAT_STRING" value="#,###"/>
<CalculatedMemberProperty name="DATATYPE" value="Numeric"/>
</CalculatedMember>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.