是否可以编写仅查询并返回维度数据的MDX查询?
例如,假设我有一个具有“客户”维度的“销售”多维数据集,而客户维度有三个属性:“客户名称”,“客户ID”和“客户业务部门”。我想要一个查询,为所有“客户业务部门”价值为“银行业务”的客户返回“客户名称”和“客户ID”属性。
答案 0 :(得分:0)
您可以使用calculated members,例如:
with
member xName as dim.currentMember.NAME
member XProp as dim.currentMember.properties('prop')
select
{ [xName], [xProp] } on 0,
dim.allMembers on 1
from [cube]
答案 1 :(得分:0)
绝对
<div flex style="max-width:700px;">
<input type = "file" file-model = "myFile"/>
<button ng-click = "vm.uploadFile()">upload me</button>
</div>
答案 2 :(得分:0)
如果你在谈论“属性”,那么可能是以下模式:
WITH
MEMBER [Measures].[CustName] AS
[Customer].CURRENTMEMBER.properties('Customer Name')
MEMBER [Measures].[CustID] AS
[Customer].CURRENTMEMBER.properties('Customer ID')
MEMBER [Measures].[CustSector] AS
[Customer].CURRENTMEMBER.properties('Customer Business Sector')
SET [CustBankers] AS
FILTER(
[Customer].[Customer].MEMBERS AS C
,[Measures].[CustSector] = 'Banking'
)
SELECT
{
[Measures].[CustName]
,[Measures].[CustID]
} ON 0,
[CustBankers] ON 1
FROM [YourCube];
我怀疑当你提到“属性”时,你指的是Customer维度中的三个属性层次结构。如果是这种情况,那么更像是以下内容:
WITH
MEMBER [Measures].[CustName] AS
[Customer].[Customer Name].CURRENTMEMBER.member_caption
MEMBER [Measures].[CustID] AS
[Customer].[Customer ID].CURRENTMEMBER.member_caption
MEMBER [Measures].[CustSector] AS
[Customer].CURRENTMEMBER.properties('Customer Business Sector')
SET [CustBankers] AS
EXISTS(
[Customer].[Customer].MEMBERS
,[Customer].[Customer Business Sector].[Banking]
)
SELECT
{
[Measures].[CustName]
,[Measures].[CustID]
} ON 0,
[CustBankers] ON 1
FROM [YourCube];