SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Need to correct below MDX query.


Need to correct below MDX query.

Author
Message
saurabh.deshpande
saurabh.deshpande
Old Hand
Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)

Group: General Forum Members
Points: 308 Visits: 114
Hi,

I need to write MDX query to calculate GLOBAL_BALANCE (For MTD & For given date). I used below query. It is working for MTD but not working for "given date". Please help to correct the query.

WITH
MEMBER Measures.DTD as (StrToMember([@Posted Date]),
[Measures].[Global Balance])
SELECT {
[Measures].[Global Balance]
,[Measures].[DTD] } ON COLUMNS,
NON EMPTY { (

[Location Enterprise].[Operations Name].[Operations Name]*
[Location Enterprise].[Region Name].[Region Name]*
[GL Code Combination].[BR Account Type].[BR Account Type]


) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM ( SELECT ( [Period].[Period Hierarchy].[Period Year].&[2.011E3] ) ON COLUMNS
FROM ( SELECT ( [GL Code Combination].[BR PL Impact].[BR PL Impact]) ON COLUMNS
FROM ( SELECT ( [GL Code Combination].[BR Line].[BR Line]) ON COLUMNS
FROM ( SELECT ( [GL Code Combination].[BR Impact].[BR Impact]) ON COLUMNS
FROM ( SELECT ( [Location Enterprise].[District Full Name].[District Full Name]) ON COLUMNS

FROM ( SELECT ( [Location Enterprise].[FC Name].[FC Name]) ON COLUMNS
FROM ( SELECT ( [Location Enterprise].[Region Name].[Region Name]) ON COLUMNS
FROM ( SELECT ( [Location Enterprise].[Operations Name] ) ON COLUMNS

FROM [SSAS_CUBE])))))))) WHERE (

{[GL Code Combination].[Enabled Flag].&[Y]},
{[Location Enterprise].[Source Id].&[EBS]},
{[Location Enterprise].[Enabled Flag].&[Y]},
{[Department Enterprise].[Source Id].&[EBS]},
{[Department Enterprise].[Enabled Flag].&[Y]})
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search