Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

AND statement help

Hey I would like to something like, sum TransactionAmount thats between start and end dates, ( i would like to get the sum of transactions in a selected month )

if anyone could please point me in the right direction.

SUM( {< Year=, PeriodName=, postingDate={"<=$(vEndDate)" AND ">=$(vStartDate)"} >}  TransactionAmount)

thanks.

Bon.

10 Replies
danieloberbilli
Specialist II
Specialist II

try:

SUM(   {< ...   postingDate = {"<=$(vEndDate)" } * {">=$(vStartDate)"} >}  ...

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

SUM( {< Year=, PeriodName=, postingDate={">=$(vStartDate)<=$(vEndDate)" } >}  TransactionAmount)


Note : postingDate, vStartDate and vEndDate should be in the same date format.


Regards,

Jagan.

its_anandrjs

Try this way also

SUM( {< Year=, PeriodName=, postingDate={' >=$(vStartDate) <=$(vEndDate) ' } >}  TransactionAmount )

Or

SUM( {< Year=, PeriodName=, postingDate={" >=$(vStartDate)<=$(vEndDate) " } >}  TransactionAmount )


Regards

Anand


Not applicable
Author

Hi,

Here no need to menstion AND

you can try this one

SUM( {< Year=, PeriodName=, postingDate={"<=$(vEndDate)  >=$(vStartDate)"} >}  TransactionAmount)

Anonymous
Not applicable
Author

Hey

Thanks for all your help, some worked some didn't, still it hasn't given me the results I was after,

maybe its something wrong with my codes. will go through everything again.

thanks.

Bon.

fernando_tonial
Partner - Specialist
Partner - Specialist

Hi, check the field format postingDate and variable return in same format.

SUM( {$<Year=, PeriodName=, postingDate={">=$(vStartDate)<=$(vEndDate) " }>}  TransactionAmount )

Best Regards.

Tonial.

Don't Worry, be Qlik.
anbu1984
Master III
Master III

Issue might be due to date format. If you can not figure out, can you post sample qvw

Not applicable
Author

Hi,

May be This works:

SUM( {< Year=, PeriodName=, postingDate = {" >=$(=vStartDate) <=$(=vEndDate) "}>}  TransactionAmount )


Best,

Robert

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

SUM( {< Year=, PeriodName=, postingDate={">=$(vStartDate)<=$(vEndDate)" } >}  TransactionAmount)


Note : postingDate, vStartDate and vEndDate should be in the same date format.


Check date format of postingDate in list box and variables in vStartDate and vEndDate in text objects all should be in the same date format.


Hope this helps you.


Regards,

Jagan.