If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Error in a logic filter using Level unique name and member caption

Started by shibastroke, 13 Oct 2014 02:16:22 PM

Previous topic - Next topic

shibastroke

Hi All,

I am trying to implement a logic based on the Level unique name and caption from a main report passing these two parameter to my detail report, in my detail report I am using the following sintax:

case
when ?Level? = '[SC_PMH_CE].[Divisions].[Divisions].[Brand]'
then [SC_PMH_CE].[Divisions].[Divisions].[Brand].[Brand - Category Code] = ?Caption?
else 1=1
end

When I validate the filter expression it says no error but when I try to get the report or a tabular data output I am getting the following:


QE-DEF-0260
   
         Parsing error before or near position: 143 of: "case
when ?Level? = '[SC_PMH_CE].[Divisions].[Divisions].[Brand]'
then [SC_PMH_CE].[Divisions].[Divisions].[Brand].[Brand - Category Code] ="

Does someone have any idea why I am incorrect?

Thank you




bdbits

First thing I notice is you have this part of the expression backwards, should be:
when '[SC_PMH_CE].[Divisions].[Divisions].[Brand]' = ?Level?

What do you want to happen here? The else evaluates to a boolean but depending on how this is being used that may or may not work. Is this for a detail filter or a slicer? (If this is a dimensional source you should use a slicer, if relational a detail filter.)

(Also just so you know, it is spelled "syntax". A sin tax is when government puts taxes on something to discourage it, like tobacco or alcohol for example.  8) )

Lynn

[quote author=bdbits link=topic=26160.msg83142#msg83142 date=1413230413
(Also just so you know, it is spelled "syntax". A sin tax is when government puts taxes on something to discourage it, like tobacco or alcohol for example.  8) )
[/quote]

;D ;D ;D ;D ;D

CognosPaul

If there was a tax on sin, I'd be broke...


I think I understand the problem.

Shibastroke, it looks like you're using a powercube as a source. If that's so, you shouldn't be using detail filters at all. In a cube you can reference members directly.

Let's say you're using the Level parameter to control what appears inside the Caption prompt. Your Level prompt would contain static choices:
Display   Use
Brand     [SC_PMH_CE].[Divisions].[Divisions].[Brand]
Region    [SC_PMH_CE].[Divisions].[Divisions].[Region]

You could then set the caption prompt to be:
#prompt('Level','token')#

Finally in the report, you would simply use the member that the user selects. If you need to filter the query without showing the brand, you would use a slicer, otherwise just put the prompt directly into the data item you're using on the page.

#prompt('Caption','mun')#