MDX 取维度范围的度量值
0
大家好!
问题:有一张客户维度表,维度字段有:年龄、性别等,要去不同区间的"收入"度量值
用SQL语言来表达:
select
sum(case when sex like '%男%' then bill_charge end),
sum(case when sex like '%女%' then bill_charge end)
sum(case when age <=20 then bill_charge end),
sum(case when age >20 and age <=30 then bill_charge end),
sum(case when age >30 and age <=50 then bill_charge end),
sum(case when age >50 then bill_charge end)
from fact_table
请问MDX如何实现这个写法? 多谢赐教!
问题:有一张客户维度表,维度字段有:年龄、性别等,要去不同区间的"收入"度量值
用SQL语言来表达:
select
sum(case when sex like '%男%' then bill_charge end),
sum(case when sex like '%女%' then bill_charge end)
sum(case when age <=20 then bill_charge end),
sum(case when age >20 and age <=30 then bill_charge end),
sum(case when age >30 and age <=50 then bill_charge end),
sum(case when age >50 then bill_charge end)
from fact_table
请问MDX如何实现这个写法? 多谢赐教!
没有找到相关结果
重要提示:提问者不能发表回复,可以通过评论与回答者沟通,沟通后可以通过编辑功能完善问题描述,以便后续其他人能够更容易理解问题.
2 个回复
郑大鹏 2018-08-29 回答
赞同来自:
然后
([客户].[区间].ALLMEMBERS,[MEASURES].[bill_charge])
就可以了
伯乐快乐 2018-09-08 回答
赞同来自:
需要技能:有数据仓库项目经验、熟识数据仓库体系架构、必须熟识ETL流程;
熟识Datastage、PLSQL开发技术;
有数据建模经验或报表开发经验者优先;
思路清晰、沟通表达能力强、工作态度积极;
待遇优厚,五险一金,双休,带薪年假,每年例行体检。
工作地:南京
有意者私聊,张女士15951725143(微信同号)