Showing posts with label kpi. Show all posts
Showing posts with label kpi. Show all posts

Tuesday, March 27, 2012

Advice on dimension-dependant KPI Goals

We have KPI goals that vary based on the country or state.

For instance for US Stores, the goal is 2, and for stores in NY the goal is 2.8

I can create an SQL table with KPI_Name, Country or State, and KPI_Goal. I can also generate a view that will provide the proper KPI goal for each store.

What is the best practice to implement this kind of KPI ? I just don't know where to start. The examples I've seen are all hardcoded, like CASE when Store = XXX then 2.8

I'd rather avoid hardcoding KPI goals in the cube design as I'm expecting users to adjust goals regularily.

Can you create KPI goal measure group on its own. This is quite common. Then when you build KPIs, for goal you select value from this measure group.|||Good idea. Why didn't I think of that.

Tuesday, March 6, 2012

ADOMD.net Can't get the KPI.ID or Cube.ID

When you open an AS project, you will see every object has an ID property, just like KPI.ID and cube.ID and Dimention.ID. And that's diffrent of the Name property. You could chanage the name property to everything you like, but when you created an object, you could not change it's ID.

When i use the ADOMD.NET, I could do this:

Dim myKPIConnection As AdomdConnection
Dim myCubeDef As CubeDef
Dim k As Kpi

myConnectionString = "Data Source=" + myOlapServer + ";Catalog=" + myOlapDatabase + ";Provider=MSOLAP;"

myKPIConnection = New AdomdConnection(myConnectionString)
myKPIConnection.Open()

For i = 0 To myKPIConnection.Cubes.Count - 1

If myKPIConnection.Cubes(i).Type = CubeType.Cube Then

myCubeDef = myKPIConnection.Cubes(i)

k = myKPIConnection.Cubes(i).Kpis(0)

MessageBox.Show(k.Name)

MessageBox.Show(k.Caption)

end if
next

But the question is, there's no k.ID or cubes(i).ID property there!

The k.Name and k.Caption both refer to the kpi's Name property in the AS server in factly.

Is that means we could not use the object 's ID property in the ADOMD.NET?

Another question, in MDX, we could only refer a dimention by it's name, and could not by it's ID, right?

ivanchain wrote:

Is that means we could not use the object 's ID property in the ADOMD.NET?

Another question, in MDX, we could only refer a dimention by it's name, and could not by it's ID, right?

That's right. In ADOMD.NET and MDX all references are done by name. The ID property is mainly used by the administrative APIs