Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Syntax error

Hello,

What is wrong with this syntax??

=sum(if(Clearing_AUGDT >'31/Jan/2014' and [Posting Date_BUDAT]<='31/Jan/2014' , ([Amount in LC_DMBTR])))

Why its not working?

Please suggest.

Regards,

Balraj

9 Replies
tresesco
MVP
MVP

One reason could be mismatch in date format

Not applicable
Author

Hi Balraj,

You can try this

=Sum(if((Date(Clearing_AUGDT,'DD/MMM/YYY')>Date('31/Jan/2014','DD/MMM/YYY)) and (Date([Posting Date_BUDAT],DD/MMM/YYY')<=Date(31/Jan/2014',DD/MMM/YYY')), ([Amount in LC_DMBTR]),0))

jyothish8807
Master II
Master II

Its better to change it into date format in script, so that it works properly in all tables and expression.

In script:

Load

Date(Clearing_AUGDT,'DD/MM/YYYY') as Clearing_AUGDT,

Date([Posting Date_BUDAT],'DD/MM/YYYY') as Posting Date_BUDAT

from.....................;

After this try the same script you used.Hope this help.

Regrds

KC

Best Regards,
KC
Anonymous
Not applicable
Author

not working

jagan
Luminary Alumni
Luminary Alumni

Hi,

Attach sample file so that it would be easier to check.

Regards,

Jagan.

Anonymous
Not applicable
Author

=sum({$<Clearing_AUGDT  ='>''31/Jan/2014', [D/CIndicator]={'S'}>} [Amount in LC_DMBTR])

Could you tell what is the syntax error?

Not applicable
Author

From the field names (BUDAT), it seems you are working with SAP data. The dates in SAP are anyway trickier to work with. Check from qvd in what format the date is being stored and has the QV app recognised it as a date format.

One of the initial tests can be to check in a text box if a Num operation on the date field gives the correct number corresponding to that date.

tresesco
MVP
MVP

Correct syntax:

=sum({$<Clearing_AUGDT  ={'>31/Jan/2014'}, [D/CIndicator]={'S'}>} [Amount in LC_DMBTR])

jyothish8807
Master II
Master II

''31/Jan/2014'  is the error

=sum({$<Clearing_AUGDT  ={'>31/Jan/2014'}, [D/CIndicator]={'S'}>} [Amount in LC_DMBTR])

Try this.

Best Regards,
KC