Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need to correct below MDX query. Expand / Collapse
Author
Message
Posted Wednesday, October 17, 2012 5:49 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, May 8, 2014 4:25 AM
Points: 62, 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]})



Post #1373738
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse