Jump to content
We've recently updated our Privacy Statement, available here ×

Expression Editor - Condition for Bar Chart


pentaloc

Recommended Posts

Hi,

 

I want to create a bar chart to compare two different years. 

There is only one sql query and one year parameter ($P{year}) because I think only one Dataset can be used for a chart. (If not I would use two datasets with two different year parameter…)

 

Here is my category series for the current year:

Series expression: $P{year}

Category exp: $F{year}.compareTo($P{year})?$F{month}:"nothing"

Value expression: ${sales}

 

It works fine and I get all the right bars but there is one bar with the label “nothing” and the value of a other year. I don’t want this additional bar :P

How can I solve this? Need more info?^^



Post Edited by pentaloc at 07/06/2012 06:59
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...