Gavin.Jones Posted February 14, 2018 Share Posted February 14, 2018 Hi all, firstly I apologise if this is a stupid question but ive hit a brickwall.Im trying to create a calculated field that brings back a meter reading value if the related meter reading date meets certain criteria (Today-30 days). I can get this to work in Excel but not in Jaspersoft.I am using this: =IF("Meter Read Date">(TODAY()-30),"Meter Read,"")The error returned states that the arguments either side of greater than are not compatable. Can anyone help with this? Thanks! Link to comment Share on other sites More sharing options...
sergey.vishnevetskiy Posted February 14, 2018 Share Posted February 14, 2018 For sure it's not enough info. Where you doing it? Is Meter Read Date parameter or field? Why you trying using Excel format? Jasper is java app and understands Java short notation for if - http://www.knaupes.net/java-short-if-else-ternary-operator/ Link to comment Share on other sites More sharing options...
GonzaLinares Posted April 17, 2018 Share Posted April 17, 2018 Guess you are having issue with the boolean expresion in the if statementI tryed this, and worked fine:IF("Date">Today(-30),'Meets criteria', 'Does not meet criteria') Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now