Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need tp perform calculation for four quantity fields with the monthend function
i have tried sum(monthend(field1+filed2+field3)) but it hasnt worked
where field1 has a logic as follows
ReceiveDate <= monthend & GR_Date = “ ” or > monthend
can i know the perfect expression for this
try like this way
sum(Field1)+ sum(Field2)+sum(Field3)
here in Field1 write your condition including in sum() function and also write measure which you want
Hi
Something like this:
Sum({<ReceiveDate = {"<=$(=MonthEnd(Today()))"}, GR_Date = {">$(=MonthEnd(Today()))", ' '}>} RangeSum(field1, field2, field3))
HTH
Jonathan
BTW be careful when adding. If any of the field1 - field3 is null, then that record will not add in the amounts for the other fields. RangeSum fixes that.
Thanks for the reply but my condition is to get it for the monthend data but the expression that you provided gives the sum of all fields
Hi
I have a doubt in this expression that the rangesum(fields) will give me the total sum right but i need it only for the last day of each month i.e by using monthend function
You mean the expression should only be calculated for the last day of the month?
Usually I add a flag =1 for end of month and I multiply by the flag.
yeah that perfect everything that i calculate should be based on the last day of the month
you can see the above straight table that displays some billions of data but the actual data should be lessthan 50millions and there is a problem in the average expression for the first field i got a value as 6.0 and the avg function doesnt work at all