COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: erics on 24 Feb 2015 02:42:04 PM

Title: Dynamic chart values
Post by: erics on 24 Feb 2015 02:42:04 PM
Hey There,
I've been asked to write a report based on a table with a month field and 19 columns for 19 different types of sales totals for that month.
What the user would like is that based off of a drop down, the chart (line graph) only show the monthly totals for that type of sale.

Is there a way to either change y-axis and series dynamically?
If not, is it possible to plot all 19 columns, and dynamically make them invisible/visible?
Worst case, I can always build a view with 3 columns, month, sales type, and amount and filter based on type, but that'll be time and resource consuming ...

Thanks,
Eric
Title: Re: Dynamic chart values
Post by: BigChris on 25 Feb 2015 02:28:18 AM
I'd be tempted to build a 20th column and put the measure that the user wants to graph into it. I'd set up a prompt for the field that they're looking for:

CASE ?PromptColumn?
WHEN '1st' then [Column1]
WHEN '2nd' then [Column2]
...
ELSE 0
END

then you can just plot that column on your graph. You'd need to set up some static choices for your prompt, but I think that should work.