私は MDX を初めて使用します。基本的に、SSAS MDX の結果を JSON オブジェクトにシリアル化する必要があります。
MDX クエリ:
SELECT
(
[Measures].[Max Available]
) ON COLUMNS
, NON EMPTY
(
[Application].[Product].Children * [Application].[Application Name].Children
) DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS
FROM [Applications]
次のような MDX 結果があるとします。
__________________________________
| | | Measure1 |
| Product1 | Feature1 | 1 |
| Product1 | Feature2 | 1 |
| Product1 | Feature3 | 10 |
| Product2 | Feature1 | 1 |
| Product2 | Feature2 | 1 |
| Product3 | Feature1 | 1 |
| Product3 | Feature2 | 1 |
| Product3 | Feature3 | 1 |
| Product3 | Feature4 | 1 |
次のような JSON オブジェクトを作成する必要があります (測定値は必要ありません。MDX 階層内の製品と機能の有効なリストを取得するために使用しただけです)。
[
{
"product":"Product1",
"feature":[
"Feature1",
"Feature2",
"Feature3"
]
}, {
"product":"Product2",
"feature":[
"Feature1",
"Feature2"
]
}, {
"product":"Product3",
"feature":[
"Feature1",
"Feature2",
"Feature3",
"Feature4"
]
}, {
...
}
]
私は ExecuteCellSet() を使用して ADOMD.NET ライブラリを使用していますが、これも初めてです。誰かが私を正しい方向に向けることができますか?
ありがとう、dfox