SSRS Parse UniqueName of a member to display it as date in Using MDX
here is my probl开发者_运维问答em
[Time].[Month Hierarchy].[Day].&[2006]&[2]&[26]
how to parse the UniqueName above to display like this --> 2006/2/26 using mdx or expression in ssrs
thank you very much
You can use the expression below. Change the field name to match your own.
= Replace(Replace(Replace(Mid(Fields!Day.value,33,16),']',''),'[',''),'&','/')
If you know than every level contains the appropiate member_key you could use the VB date functions:
With Member Measures.Date As DATESERIAL(
Ancestor([Time].[Month Hierarchy].CurrentMember, [Time].[Month Hierarchy].[YEAR_LEVEL]).MEMBER_KEY,
Ancestor([Time].[Month Hierarchy].CurrentMember, [Time].[Month Hierarchy].[MONTH_LEVEL]).MEMBER_KEY,
[Time].[Month Hierarchy].CurrentMember.MEMBER_KEY)
Select
{Measures.Date} On Columns,
{[Time].[Month Hierarchy].[Day].&[2006]&[2]&[26]} On Rows
From [YOUR_CUBE]
精彩评论