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

Change chart value based on a prompt

Started by wildtopiwala, 03 Nov 2014 07:04:10 AM

Previous topic - Next topic

wildtopiwala

Hello, I have a chart based on a OLAP cube in which I have YTD months and I have a prompt in which I have values YTD,QTD,MTD. What I want is when I select MTD I should only the MTD month and If I select QTD, I should only see QTD months.

I tried using case statement but it seems like it doesn't work with OLAP.

Can someone please guide me how can I achieve this?

Thanks

MFGF

Quote from: CognosDev007 on 03 Nov 2014 07:04:10 AM
Hello, I have a chart based on a OLAP cube in which I have YTD months and I have a prompt in which I have values YTD,QTD,MTD. What I want is when I select MTD I should only the MTD month and If I select QTD, I should only see QTD months.

I tried using case statement but it seems like it doesn't work with OLAP.

Can someone please guide me how can I achieve this?

Thanks

Hi,

Didn't we already solve this one?

http://www.cognoise.com/index.php/topic,26316.0.html

MF.
Meep!

wildtopiwala

That was to create a prompt. Now, we want the values in the chart to change based on the selection from the prompt.

for example: by default, the chart will show MTD and it shows just this month. Now, if I select YTD from the prompt, I want the MTD to change it to YTD which mean I should see all the month starting from Jan- Nov.

Please let me know if this is still not clear.

Thanks

MFGF

Quote from: CognosDev007 on 03 Nov 2014 07:34:10 AM
That was to create a prompt. Now, we want the values in the chart to change based on the selection from the prompt.

for example: by default, the chart will show MTD and it shows just this month. Now, if I select YTD from the prompt, I want the MTD to change it to YTD which mean I should see all the month starting from Jan- Nov.

Please let me know if this is still not clear.

Thanks

Yes - that was one of the scenarios we covered in the original post. I wrote:

QuoteIf you want to display the prompted member as a row or a column in your crosstab, drag in a Query Calculation, set the type to "Other", give it a name, and code the expression as your parameter within question marks - eg ?YQMW?

The same appies to a chart as to a crosstab.

MF.
Meep!

wildtopiwala

Thanks MF for your response. I apologize for not explaining it well. Attach please find a sample to screen shot so you can understand what I am trying to do.

Based on your solution, it is filtering out the data. Now, I want the same to display on the chart.

MFGF

Quote from: CognosDev007 on 03 Nov 2014 08:15:21 AM
Thanks MF for your response. I apologize for not explaining it well. Attach please find a sample to screen shot so you can understand what I am trying to do.

Based on your solution, it is filtering out the data. Now, I want the same to display on the chart.

Hi,

Can you explain what you mean by "Based on your solution, it is filtering out the data"? If you define a prompt as described in the other thread, and add a query calculation to your chart to display the parameter selected in the prompt (as described in the other thread and above), doesn't this give you what you need? You shouldn't have a filter in this instance - just your prompt and the query calc in your chart.

If this doesn't give you the result you need, can you explain why/what you need instead?

MF.
Meep!

MFGF

Ok - I just looked at this again. In my original thread, you will get a single member representing YTD, QTD, Current Month etc, and what (I think) you want is a set of month members representing each?

If so, modify the solution as follows:

In the Static Choices of your prompt, set the Use Value for the YTD choice to be descendants([your YTD MUN],2)  where [your YTD MUN] is the member unique name of the YTD member
Set the Use Value for QTD to be descendants([your QTD MUN],1)
If you wish, set the Use Value for Current Month to be descendants([your Current Month MUN],1)

Also remember to update the Default Selections property of your prompt to reflect the appropriate modified expression for the default you want to see.

MF.
Meep!

wildtopiwala

Hi MFGF,

Attach please a sample word document which shows what I am looking. Thank for your prompted response.

MFGF

Quote from: CognosDev007 on 03 Nov 2014 09:06:46 AM
Hi MFGF,

Attach please a sample word document which shows what I am looking. Thank for your prompted response.

The approach I suggested immediately above seems to provide this. Have you tried it?

MF.
Meep!

wildtopiwala

Yes, I tried it but it didn't work.

When I drag a query calculation and put the promptdisplayvalue  on the chart x-axis it shows the "display value" from the prompt like YTD, MTD.

Will really appreciate if you some other suggestion.
Thanks

MFGF

Quote from: CognosDev007 on 03 Nov 2014 10:00:19 AM
Yes, I tried it but it didn't work.

When I drag a query calculation and put the promptdisplayvalue  on the chart x-axis it shows the "display value" from the prompt like YTD, MTD.

Will really appreciate if you some other suggestion.
Thanks

Did you change your prompt's Static Choices Use Values (as detailed above) and Default Selection to use the descendants() function?

MF.
Meep!