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

Value Prompt Default Selection

Started by kgcognos, 05 Dec 2014 10:48:34 AM

Previous topic - Next topic

kgcognos

I have a value prompt to select a month[ie January, 2014...] from the Time Dimension.
Based on the selected month, it will display TY Current Month, LY Current Month, TY YTD, LY YTD, Total LY in the report.

All is working except I cannot get the month prompt to default to "Current Month".
I tried several ways from the internet...

1. I tried using #prompt but when I select a month, the Prior Year $ is not showing up.

2. I created a Static Choice
Use
(linkmember(  firstchild(  [Sales Cube].[Fiscal Time].[Current Month].[Current Month]->:[PC].[@MEMBER].[Current Month] )   , [Sales Cube].[Fiscal Time].[Fiscal Time].[Month] ))
Display
Current Month

The Default Selection does not seem to be working using MUN for Current Month/any month or "Current Month" static choice entry
I see "Current Month" in the drop down. I can select it and report is showing fine.


3. I also tried changing the report expressions but had issues when testing the parameter value. 
if (?pSelMonth? = 'Current Month' or ?pSelMonth? = null) then 
(linkmember(  firstchild(  [Sales Cube].[Fiscal Time].[Current Month].[Current Month]->:[PC].[@MEMBER].[Current Month] )   , [Sales Cube].[Fiscal Time].[Fiscal Time].[Month] ))
else
([Sales Cube].[Fiscal Time].[Fiscal Time].[Month]->?pSelMonth?)


Please help.. Thank you in advance.


MFGF

Quote from: kgcognos on 05 Dec 2014 10:48:34 AM
I have a value prompt to select a month[ie January, 2014...] from the Time Dimension.
Based on the selected month, it will display TY Current Month, LY Current Month, TY YTD, LY YTD, Total LY in the report.

All is working except I cannot get the month prompt to default to "Current Month".
I tried several ways from the internet...

1. I tried using #prompt but when I select a month, the Prior Year $ is not showing up.

2. I created a Static Choice
Use
(linkmember(  firstchild(  [Sales Cube].[Fiscal Time].[Current Month].[Current Month]->:[PC].[@MEMBER].[Current Month] )   , [Sales Cube].[Fiscal Time].[Fiscal Time].[Month] ))
Display
Current Month

The Default Selection does not seem to be working using MUN for Current Month/any month or "Current Month" static choice entry
I see "Current Month" in the drop down. I can select it and report is showing fine.


3. I also tried changing the report expressions but had issues when testing the parameter value. 
if (?pSelMonth? = 'Current Month' or ?pSelMonth? = null) then 
(linkmember(  firstchild(  [Sales Cube].[Fiscal Time].[Current Month].[Current Month]->:[PC].[@MEMBER].[Current Month] )   , [Sales Cube].[Fiscal Time].[Fiscal Time].[Month] ))
else
([Sales Cube].[Fiscal Time].[Fiscal Time].[Month]->?pSelMonth?)


Please help.. Thank you in advance.

The simplest way to achieve this seems to be to use a prompt macro for your calculated expression. The macro will assemble the MUN of the current month member, using $current_timestamp for the current date and the timestampmask() macro function for formatting it to fit the pattern of your Month MUN. There are a number of examples of this in posts in this forum - we can help you with the syntax but we'd need to know the exact format of one of your Month MUNs. Search for timestampmask in this Report Studio forum to see some examples.

Cheers!

MF.
Meep!