COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: daniele2076 on 15 Feb 2010 03:22:57 AM

Title: Custom MDX Cognos Studio 8.4
Post by: daniele2076 on 15 Feb 2010 03:22:57 AM
Hello everybody,
i'm quite new in Cognos world.

I have to access to a MS Analysis Server 2005 and i want to write my MDX.
I've found out how to specify an mdx on a query and i tried with a simple one:

select
([TIME].[MONTH].children, [Measures].[Qty])
on columns,
([CUSTOMER].[REGION].children)
on rows
from [SALES]
where
([CUSTOMER].[CUSTOMER TYPE].&[11])

i have no problem executing this query in SSAS but in cognos i get only one Line with total (and no lines with regions)... in mdx query structure i see only axis0 available and no axis1: am i missing anything??

thank u all,
daniele
Title: Re: Custom MDX Cognos Studio 8.4
Post by: MFGF on 23 Feb 2010 07:09:32 AM
Hi Daniele,

Why would you want to do this?  It seems to be a hugely complex way of trying to write reports, and is effectively bypassing all the ease and power of the Cognos 8 query engine.

Instead, why not just create a crosstab report, dragging in the Month level in your columns, Region level in rows and Qty as the default measure, then add a slicer filter containing Member 11 from the Customer Type level.  Simple drag-and-drop like this should take seconds and is much easier than trying to code a specific MDX query and reuse it.

MF.