COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: semsel on 23 Mar 2015 01:38:52 AM

Title: How to hide running-total values in line chart if month is greater than current
Post by: semsel on 23 Mar 2015 01:38:52 AM
I am using a line chart to show the cumulative sales revenue trends for the current year along with the budget. As expected the the values will remain constant for the future months sames as of current month as the figures are zeros, However I want to hide the line and datapoints altogether for the actual revenue for the future months, and show the budget alone. I hope its clear..

I tried the following already:

1. Chart Conditional palette with boolean variable(if month > current month)
2. multiply with data item which zero for future months and 1 for the rest.
3. running-total with an if-condition

However I just could not get this to work, any insights?
Title: Re: How to hide running-total values in line chart if month is greater than current
Post by: BigChris on 23 Mar 2015 02:55:46 AM
Couldn't you just put an if statement in and make the actual revenue points in the future null - that should take them out of the graph. Something like:

if( [Month] > month(current_date)) then (NULL) else ([Sales Value])
Title: Re: How to hide running-total values in line chart if month is greater than current
Post by: semsel on 24 Mar 2015 05:10:27 AM
my query items are as follows:

Revenue = [Sales].[Sales].[Revenue]
revenue Cumulative = running-total ([Revenue])

My chart has months as its categories and Revenue Cumulative as the measure.
even if i make Revenue for future months, running total will carry last month's value and will appear on chart which I want to avoid.

Any other ideas?
Title: Re: How to hide running-total values in line chart if month is greater than current
Post by: TheFrenchGuy on 24 Mar 2015 05:25:17 AM
Even if you change your measure by your if statement ?
Title: Re: How to hide running-total values in line chart if month is greater than current
Post by: BigChris on 24 Mar 2015 06:06:17 AM
if( [Month] > month(current_date)) then (NULL) else (running-total([Revenue]))