我有一个 MDX 查询,我正在使用 Adomd.net 进行查询,其中 cmd 包含命令文本。
这在直接针对多维数据集运行时会返回以下输出,只是一个标题和计数整数,这是一个度量:
TrueCount
n
但是,如何通过 c# 访问此度量/元组/数字?
我知道如何获得标题 TrueCount(见下文),但我不知道如何获得盛开的数字。
//Execute the query, returning a cellset
CellSet cs = cmd.ExecuteCellSet();
//Output the column captions from the first axis
TupleCollection tuplesOnColumns = cs.Axes[0].Set.Tuples;
foreach (var column in tuplesOnColumns)
if (!column.Members[0].Caption.Contains("All"))
truecount.Add(new TrueCount() { CountTitle = column.Members[0].Caption });
任何想法或指针都非常感谢 - 为这个厚重的问题道歉。