How do I access KPI performance values โ€‹โ€‹using ADOMD.NET?

I am trying to access KPI metadata via ADOMD.NET (using MDSCHEMA rowsets) with SQL Server / SSAS 2008. When I get a given VALUE KPI field, for example in Adventure Works, it returns what I think is a hidden measure associated with a KPI (for example, [Measures]. [Net Income]). But the MDX conditional expression associated with it matters.

Unfortunately, I cannot find this measure anywhere in the cube. I tried to return a list of measures (MDSCHEMA_MEASURES) that are not visible (limitation is used by MEASURE_VISIBILITY = 2) via ADOMD, but I still don't get any hidden KPI measures.

So how do I get these hidden KPIs so that I can get actual MDX expressions that support the KPI Value / Trend / Goal / etc ...? If you look at the Adventure Works cube, you can see that most of the KPI values โ€‹โ€‹have MDX expressions, but I cannot recover them.

+2


source to share


2 answers


You cannot get the KPI definition through any set of schema sets. You will need to use the call DISCOVER_XML_METADATA

and traverse the returned XML.



+3


source


You can actually get the KPI using DISCOVER_XML_METADATA, but the data returned will be huge since the KPIs are just a subset of the data returned by DISCOVER_XML_METADATA.

You can use MDSCHEMA_KPIS rowset which will only return KPIs.



Hope it helps.

0


source







All Articles