Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
josueabdias91
New 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
johncaqc
Valued Contributor

Re: Restar valor con condición de fecha

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
New Contributor II

Re: Restar valor con condición de fecha

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)

 

johncaqc
Valued Contributor

Re: Restar valor con condición de fecha

That looks correct. Do you get the desired output?