Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello..
i have another problem
i want to show sum of all the data below max date
i've tried to make variable Vmax_cicildate_cad, which is the containt is :
max(date(cicildate_CAD))
and i tried to create a chart that contain a field sum of datas below variable Vmax_cicildate_cad
and the script is :
sum( if(date(cicildate_CAD)<=Vmax_cicildate_cad,
if(closetype_CA=0 and paidsts_CAD=0, Num#(angsuran_CAD ))
))
when i didn't choose any date, it worked
just like the pic below :
field "nilai" is the one
and i also made 1 list box for dates :
but when i select one of the dates like this :
it shows data like this :
"Jumlah Konsumen" and "Nilai" show as not i expected
when i tried on sql server with syntax like this :
SELECT count(custid),SUM(coraccountdetail.angsuran)
FROM coraccount
INNER JOIN coraccountdetail ON coraccount.norek = coraccountdetail.norek AND coraccount.nopin = coraccountdetail.nopin
WHERE coraccount.closetype = 0
AND coraccountdetail.paidsts = 0
AND coraccountdetail.cicildate < ('09/12/2005')
=sum({$<cicildate_CAD={"<=$(=Date(Max(cicildate_CAD)))"}>} angsuran_CAD)
That should sum all records where cicildate_CAD is less than the maximum of the currently selection of cicildate_CAD. If you have other date fields linked to cicildate_CAD, you may need to override them; something like cicildate_Month=,cicildate_YEAR=
Jonathan
Its because the selections you make (in this case date) are applied before your exprssion is calculated. In other words, when you select a date, your dataset is limited to the records that match the date selection.
You can override the selection using set analysis.
Jonathan
@Jo
owh thx Jo
but how to do that?
i've tried with :
=sum({$<cicildate_CAD={$(=Max(date(cicildate_CAD))), $(=Max(date(cicildate_CAD)))}>} angsuran_CAD)
but it doesn't work
i want to sum all the value below the date i select
i dont know how to figure this out
need help really
thx..
=sum({$<cicildate_CAD={"<=$(=Date(Max(cicildate_CAD)))"}>} angsuran_CAD)
That should sum all records where cicildate_CAD is less than the maximum of the currently selection of cicildate_CAD. If you have other date fields linked to cicildate_CAD, you may need to override them; something like cicildate_Month=,cicildate_YEAR=
Jonathan
@Jo
thx a lot Jo for ur help
it's sccess
🙂