COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: antih on 21 Nov 2011 04:05:14 AM

Title: Root node showing wrong data after prompt
Post by: antih on 21 Nov 2011 04:05:14 AM
Hello,

im quite new in the cognos world and i am trying to create a few reports on my cube. The problem is that the prompting is not working the way i want.

If i take the root node the data is aggregated the right way. The problem starts when i try to take a child node of the root node, which i can only see in my report if i try to drilldown. After the prompt with the child node i see the same data like with my first prompt. When i drill down on the level which i prompted on the data is getting corrected O_O. Is there some way to get the same data displayed for root node if im prompting on a lower level than displayed?
Thanks.
Title: Re: Root node showing wrong data after prompt
Post by: MFGF on 21 Nov 2011 05:22:54 AM
How have you implemented the prompt within your report? Is it driving a detail filter or a query calculation? It's difficult to pinpoint what the issue might be without knowing how you have written the report.

Regards,

MF.
Title: Re: Root node showing wrong data after prompt
Post by: antih on 21 Nov 2011 06:49:16 AM
Each prompting structure has its own query. The values from the prompt are saved in a parameter and are implemented in the target query via a detail filter.

antih
Title: Re: Root node showing wrong data after prompt
Post by: MFGF on 21 Nov 2011 09:39:58 AM
Thanks. Generally when reporting off a cube, detail filters chould be avoided as they can give incorrect and unpredictable results.

You might want to investigate replacing your detail filters either with embedded expressions in query items, such as [Level from your dimension] -> ?param?  if the item you are prompting on is shown in your report (which in your situation I assume it is) or via slicer filters if you are prompting on members not used as rows/columns.

Regards,

MF.
Title: Re: Root node showing wrong data after prompt
Post by: antih on 22 Nov 2011 02:59:17 AM
Thanks, I tried the first approach, but Cognos returned the error that the expression is not valid:
[Umsatzreporting_CUBE].[Region].[Inland] in (?p_inland_2910_regionprompting?).

-->   Nicht unterstützte bedingte Ausdrücke: 'expression="members([Umsatzreporting_CUBE].[Region].[Inland]) in (?p_inland_2910_regionprompting?)"'
Title: Re: Root node showing wrong data after prompt
Post by: MFGF on 22 Nov 2011 09:50:23 AM
I see the problem - you used a relational operator (in) within a dimensional expression - this is why you are getting the error.

My suggestion would have translated as:

[Umsatzreporting_CUBE].[Region].[Inland] -> ?p_inland_2910_regionprompting?

This would allow a single member to be selected.  If you wanted to be able to select multiple members, then you just need to introduce a set() function into the expression:

set([Umsatzreporting_CUBE].[Region].[Inland] -> ?p_inland_2910_regionprompting?)

Regards,

MF.

Title: Re: Root node showing wrong data after prompt
Post by: antih on 24 Nov 2011 06:55:46 AM
Aha, I see This is working perfect ;>. Thank very much   ;) .

antih