anshulbhatt90 Posted August 13, 2014 Share Posted August 13, 2014 Hi community,i want to create a calculated measure my requirement is if condition is satisfied then add 100 in sum of that particular column.so tried formula like this but its not working aggregated value is coming if("condition", column_name +100,column_name)even i tried if("condition", Sum(column_name) +100,Sum(column_name))summary calculation what i have to write to get proper value.please suggest me.thanks in advance Anshul Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted August 14, 2014 Share Posted August 14, 2014 Hi Anshul, I am assuming here that you already have a report which has a Variable which Calculates the Total of a column. 1) edit the Variable Expression and add something like this.(Here I have created a report with Sample DB in Jaspersoft Studio and created a Group on SHIPCOUNTRY. and then dragged the column TOTALORDER variable on to Group footer and selected Sum as my calculation, this created a variable TOTALORDERS1. and I Manually created TOTALORDER2 and added the below expression) IF(EQUALS($F{SHIPCOUNTRY},"Argentina"),SUM($V{TOTALORDERS1}.doubleValue(),100),$V{TOTALORDERS1}.doubleValue()) Now For further explanation. Check the Report here.https://www.dropbox.com/s/atidrkzvjuo2sds/ColumnsOnASumCondtion.rarThanks,Rajesh SirsikarFor more tips tricks check http://www.rajeshsirsikar.com 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