Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have list with dates and diagram where I need to get sum of values where date less or equal to date selected in list box.
for example:
I have data like this
data.date
data.value
the list shows data.date in month format
the expression in diagram I need is somthing like:
Sum(
if(
data.date <= (valueSelectedInList),
ByMonthPlan.Value,
0)
)
If anyone know the way how to do it, please help.
I added variable selectedDateString '=(max({dateState}data.date))'
and the expressions:
Sum( TOTAL
if(
data.date <= selectedDateString,
data.Value,
0
)
do work
Could you try:
Sum(
if(
data.date = (GetFieldSelections(Items.Code)),
ByMonthPlan.Value,
0)
)
Yes, I was tryed GetFieldSelections() with various arguments but I can't get any value.
Now I find way to get selected value but still can't use it in expression.
I put list in to {dateState} set and (max({dateState}data.date)) returns correct result
but expression returns nothing:
Sum( TOTAL
if(
data.date <= (max({dateState}data.date)),
data.Value,
0
)
any way thanks for the answer.
I added variable selectedDateString '=(max({dateState}data.date))'
and the expressions:
Sum( TOTAL
if(
data.date <= selectedDateString,
data.Value,
0
)
do work