Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to calculate the sum of the last 90 days. I've tried this but does not work.
=Sum({<Date_Key = {'>=$(=Date_Key(Max(Date_Key)-90))'}>}InvoicedQuantity)
What am i doing wrong?
Hi
try this :
=Sum({<Date_Key= {">=$(=Date(Today()-90,'MM/DD/YYYY'))<=$(=Date(Today(),'MM/DD/YYYY'))"} InvoicedQuantity)
Higlhlighted : Please use appropriate date format .
I assume Date_Key is a field. It's not a function in any case so Date_Key( ...something... ) won't do anything.
=Sum({<Date_Key = {">=$(=Date(Max(Date_Key)-90,'MM/DD/YYYY'))"}>}InvoicedQuantity)
Change MM/DD/YYYY to whatever the actual date format of your Date_Key field is. And if Date_Key does not contain date values then replace it with a field that does contain date values.
I tried to modify it like this
=Sum({<DateName = {">=$(=Date(Max(DateName)-90,'YYYY/MM/DD'))"}>}InvoicedQuantity)
DateName is this format: 2016/01/01.
But still no luck
Check that your dates are actually dates and not just text values that look like dates. What does =Num(DateName) return in a text box?
It give me nothing.
just a "-"
What is showing in text object after selecting any one date from DateNum field.
Then your DateName values are text, not dates. Use a real date field or use the Date# function in the script to make real dates from the text values.