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

How can I use a CASE WHEN or IIF statement in JasperReports Server Crosstab?


lee.owens

Recommended Posts

Hello,

I am building a crosstab report in JRS and I'm trying to calculate a daily average sales figure for each month.

The report looks like the below

 Crosstab.png.4cdb64015466ed0585a25e9da70c6532.png

 

The trading days calculation is set up dynamically for the last 3 months as a derived table, so i have 3 values for each of the previous months.

I'm now trying to set up some logic, so that if the column header = 3 months ago, then divide the value by "Trading Days 3 Months Ago". If the column header = 2 months ago, then divide the value by "Trading Days 2 Months Ago" respectively.

I have tried to play around with the IF and CASE WHEN functions in the cacluated field options, but I can't seem to make it work.

Any ideas?

Thank you

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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...