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
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.
Hi Nimrod,
exactly what I mean.
thank you very much
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,
Hello tequila,
Can you explain what you did and how u did? it's very needful in my requirement
Thanks,
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.
you can use lag([Current Month],12) to get the same month from last year
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