Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
josueabdias91
Contributor II
Contributor II

Restar valor con condición de fecha

Dear collaborators, I request your support to solve the following question, I need to subtract the sum of
"SUM (SalesAmount) -SUM (Quantity2) WHERE DATE <=" taking into account a date range

Example:

Resta.jpg

 

The correct option would be: Sum({< CalendarDate = {'<=$(=Date(vStartDate))'} >} SalesAmount) –Sum({< CalendarDate = {'<=$(=Date(vStartDate))'} >} Cantidad2) ???

Labels (2)
3 Replies
johnca
Specialist
Specialist

Have you tried looking at each half of the equation to see if they are being calculated correctly? Verified the CalendarDate and variable date formats match?

v/r, john
josueabdias91
Contributor II
Contributor II
Author

Perdón estuve ausente, aparentemente tengo un error en las fechas.

Por otra parte el proceso de la operación seria el correcto como lo especifico a continuación?

 

Sorry I was absent, apparently I have an error in the dates.

On the other hand, the process of the operation would be correct as specified below?

Sum({< CalendarDate = {'<=$(=Date(vStartDate))'} >} SalesAmount) –Sum({< CalendarDate = {'<=$(=Date(vStartDate))'} >} Cantidad2)

 

johnca
Specialist
Specialist

That looks correct. Do you get the desired output?