Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yadav_anil782
Creator II
Creator II

need to put variable on value till today

Dear Comunity,

i have data in table year 2010 to year 2016  but i want to represent data only till sysdate mean till today so i'm puting this script in expresion but its not working plz suggest how to use vtoday variable in this script

=sum(COMPONENT_AMOUNT)<=vtoday

7 Replies
sunny_talwar

May be this:

If(DatabaseYearFieldName <= Year(Today()), Sum(COMPONENT_AMOUNT))

Kushal_Chawda

Try with set analysis

=Sum({<Year = {"<=$(=year(today()))"}>}COMPONENT_AMOUNT)

Anonymous
Not applicable

Anil,

try this one..

=sum({<DateFieldName={"<=$(=date(today(), req format)))"}>} Component_Amount)

jonathandienst
Partner - Champion III
Partner - Champion III

In script, filter out data withe dates after today as:

LOAD ...

FROM ...

WHERE myDateDateField <= Today();

or

SQL SELECT ...

FROM ...

WHERE myDateDateField <= '$(vtoday)';  

The actual script depends on how vtoday is defined....

In expressions in the front end

Sum(If(myDateField <= '$(vtoday)', amount))

Sum({<myDateField = {"<=$(=vtoday)"}>} amount)

Again, the exact syntax depends on how vtoday is defined.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jsingh71
Partner - Specialist
Partner - Specialist

See this

Pivot.png

Not applicable

Try the below expression @Anil

=sum({<Date = {"<=$(=today())"}>}COMPONENT_AMOUNT)

yadav_anil782
Creator II
Creator II
Author

Thanks Balraj