如何通过 ADOMD.NET 访问 KPI 值隐藏度量?

发布于 2024-08-06 10:40:05 字数 429 浏览 3 评论 0原文

我正在尝试使用 SQL Server/SSAS 2008 通过 ADOMD.NET(使用 MDSCHEMA 行集)访问 KPI 元数据。当我获得给定的 KPI VALUE 字段(例如在 Adventure Works 中)时,它会返回我认为关联的隐藏度量值与 KPI(例如,[措施].[净收入值])。但该值具有与其关联的实际 MDX 表达式。

不幸的是我在立方体的任何地方都找不到这个度量。我尝试通过 ADOMD 取回不可见的度量列表 (MDSCHEMA_MEASURES)(使用的限制是 MEASURE_VISIBILITY=2),但我仍然没有取回任何 KPI 隐藏度量。

那么,如何获取这些隐藏的 KPI 度量,以便获得支持 KPI 值/趋势/目标/等的实际 MDX 表达式...?如果您查看 Adventure Works 多维数据集,您会发现大多数 KPI 值都有 MDX 表达式,但我似乎无法检索它们。

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

Unfortunately I can't find this measure anywhere in the cube. I've tried getting back the list of measures (MDSCHEMA_MEASURES) that are not visible (restriction used is MEASURE_VISIBILITY=2) via ADOMD, but I still don't get back any of the KPI hidden measures.

So how do I get those hidden KPI measures so that I can get the actual MDX expressions backing the KPI Value/Trend/Goal/etc...? If you take a look at the Adventure Works cube you can see that most of the KPI Values have MDX expressions, but I can't seem to retrieve them.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尐偏执 2024-08-13 10:40:05

您无法通过任何架构行集获取 KPI 的定义。您需要使用 DISCOVER_XML_METADATA 调用并浏览返回的 XML。

You can't get at the definition of the KPIs through any of the Schema rowsets. You would need to use a DISCOVER_XML_METADATA call and navigate through the returned XML.

恰似旧人归 2024-08-13 10:40:05

您确实可以使用 DISCOVER_XML_METADATA 获取 KPI,但返回的数据将会很大,因为 KPI 只是 DISCOVER_XML_METADATA 返回的数据的子集。

您可以使用仅返回 KPI 的 MDSCHEMA_KPIS 行集。

希望这有帮助。

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

You can use the MDSCHEMA_KPIS rowset which will return KPIs only.

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文