Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
=Sum(If(REC_DAT<='$(vMonthEndDate)' and (Len(GR_DAT)=0 OR GR_DAT>='$(vMonthEndDate)'),INV_QTY))
variable vMonthenddate consists of all the monthend date in DD-MM-YYYY
this expression works well butif the selection is based on month but it is not working on year selection as its showing 0 as output
What is the exact definition of variable vMonthEndDate?
Date(MonthEnd(Date),'DD-MM-YYYY') as MothEndDate,
vMonthEndDate is =mothendDate
If you select a year, the variable doesn't get assigned by a value, because it has many values(many monthend values for a year) in the scope then and your variable dfinition doesn't tell about which to be considered when many are there. I guess you have to use an aggregation function like:
vMonthEndDate = Date(Max(MonthEndDate), 'DD-MM-YYYY')
the aggregation function displays all the months but I am getting the same values for all the months is there any problrm in the expression are can u find where the mistake is
Hard saying without seeing your app and understanding the data. A first look at your expression tells me that may be you need AND rather than OR like:
=Sum(If(REC_DAT<='$(vMonthEndDate)' and (Len(GR_DAT)=0 AND GR_DAT>='$(vMonthEndDate)'),INV_QTY))
vMonthEndDate = Date(Max(MonthEndDate), 'DD-MM-YYYY')
this expression is displaying the maximum value that is present in the year and that value is being displayed in all the month fields, when i use the min instead of max it displays the minimum value for all the month fields