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

case expression

Started by zaib, 17 Jan 2014 07:59:14 PM

Previous topic - Next topic

zaib

I am using case expression in a query item but my expression return 2 values, seems like else is working even though I do not use else in my expression.

case when ([Transformation View].[General & Adminsitration].[Key Part 2] = '4') then ([Transformation View].[General & Adminsitration].[Key Part 2]) end

((see attachment))

Here is what I am trying to do may be there is a better way::I am new to FM and I am trying to build a query subject which will have filters for each query item. if I add filters to query subject then it applies to whole query subject  which I do not want... Another approach I am thinking but have not tried yet is to split these query items in its own query subject and then merge all them in new query subject.

Any help is appreciated.

Thanks,
Zeek

charon

hey zeek...
could you pls explain the goal you want to achieve in another way?
QuoteHere is what I am trying to do may be there is a better way::I am new to FM and I am trying to build a query subject which will have filters for each query item

So you want a query item (e.g. [Time]) with different filter for attributes ([month] has different filter then [year]). whats the idea behind that? I would like to help, but i first have 2 understand your requierement ;)
cheerz [/quote]

zaib

Thanks Charon. I will break my question into two parts
Part 1
I have a requirement to create a specific financial package for some executive reports.
The acct query subject is
Acct id, Acct Description,Acct Part 1, Acct Part 2, Rpt 1, Rept 2,....
Acct Part 1,Rpt 1, ... all these are different groups of acct id.
My requirement is that I need Gift Revenue which is Acct Part 1 value 200 and Rept 2 = 1 so in order to accomplish this I create a query subject acct and created query item Gift Revenue using case for the filter but this brings 2 values back.
How do I tackle such query subject? Do I make separate query subjects for each like Gift Revenue, Contract Revenue,... and then merge query subject or some other better way?

Part 2
My source saves actuals in different columns, month1, month2,..month12 so in order to make it dynamic I used case statement same issue it bring out 13 months (1 extra). How do I tackle this one?

zaib

Let me know if I am not making any sense? I am new to FM.

charon

Hi Z-Cog,
i have written you an email some days ago.
It would help if you could post a FM-Diagramm of a simple sketch/drawing of your metadatamodell with the relevant attributes, tables and join paths.
Also, maybe a crosstab of your requierement, what you want to achieve.
Im sry, but im a men of visualizations ;)

Thx a lot, have a nice evening
br charon

zaib

Thanks Charon, I was out of town. I will get a visual uploaded shortly.

zaib

Attached is the visual. Now I have two questions.

1) How do I approach with key query subject.
2) How do I approach the actual as each month has its own bucket.


zaib

Any pointer will be highly appreciated. I am new to FM