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

Prompt - which current_year as standard setting

Started by tequila, 27 Feb 2014 05:19:31 AM

Previous topic - Next topic

tequila

Hello,

I have list (crosstab) contain costumer revenue in years (2009,2010, 2011, 2012, 2013 and 2014), and a optional prompt to choice a year.

When I start a report und don't choice a year, the list will show only 'current_year' (2014) as Standard settig and not all years.
And after that i can choice other year so far as i will.

Have anybody solution for me

thnx




navissar

#1
So, this is a report against a relational data source which should display by default the current year, and if the user selects another year(s) - then it should re-run for those years, right?
We can't really use default selections, because this is dynamic (current year). Macros are particularly handy in situations like this - you set the default value in the macro like this:

[namespace].[query subject].[Year] = #prompt('year','integer',timestampMask ($current_timestamp,'yyyy'))#

This expression will default to current year.
If you want to enable multi select (So users can choose more than one year), you should use
[namespace].[query subject].[Year] in (#promptmany('year','integer',timestampMask ($current_timestamp,'yyyy'))#)

This should do the trick.

tequila

Hi Nimrod,

exactly what I mean.

thank you very much


srinu_anu2007

Hi,

My requirment is also same when iam using this filtter iam getting an error


my filter:[packagename].[dimname].[hierarchy name] in (#promptmany ('Year','integer',timestampMask ($current_timestamp,'yyyy'))#)

The argument at position 2 of the function 'in' is invalid in filter/slicer expression '[packagename].[dimname].[hierarchy name] in (2014) ' of query 'Year_Prompt', expected one of the following types: 'member, memberSet'.

iam not using 2014 in my query. please suggest me.

Thanks,

srinu_anu2007

Hello tequila,

Can you explain what you did and how u did? it's very needful in my requirement

Thanks,

navissar

Yeah, you're using a dimensional datasource. That would be different. Try
set([packagename].[dimname].[hierarchy name].[Year level]) in (#promptmany ('Year','integer',timestampMask ($current_timestamp,'yyyy'))#)

Or create a proper filter using dimensional syntax.

Francis aka khayman

you can use lag([Current Month],12) to get the same month from last year

srinu_anu2007

Hi Nimrod,

I don't have levels in my hierarchy and you can see the whatever i attached for dynamic current month i.e. the same hierarchy for year also iam using and what iam doing in that hierarchy is iam just dragging the hierarchy to my query and selecting the root members only radio buttion and able to see all years like..2009...2017. and i am filtering as you suggested still it's giivng an error(The V5 Query could not be planned by the Query Service. The 'BaseMember' node is invalid for the OLAP Transformation Library and the Query Service Planner is currently not able to resolve it.) can you please suggest the same.

Thanks