Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Expression to calculate revenue invoiced for today

I've written an expression to calculate revenue invoiced today using a variable but I can't seem to get the syntax correct. I keep getting error in set modifier ad hoc element list: ',' or ')' expected.

Here is my expression:

=Money(sum({<TRANDATE={$=vToday},TRANSACTION_ORDER={'0'}>}AMOUNT))

1 Solution

Accepted Solutions
Not applicable

Re: Expression to calculate revenue invoiced for today

I figured out the issue. My TRANDATE field did not have the same date format as my vToday variable, so I just created a new TransDate field that has the same format. Now when I plug that field into the expression you gave me it is returning a value. Thank you for your help with the expression.

6 Replies
mphekin12
Valued Contributor

Re: Expression to calculate revenue invoiced for today

Try this:

=Money(sum({<TRANDATE={'$(vToday)'},TRANSACTION_ORDER={'0'}>}AMOUNT))

bbi_mba_76
Valued Contributor

Re: Expression to calculate revenue invoiced for today

Hi,

have you tried

=Money(sum({<TRANDATE={$(=vToday)},TRANSACTION_ORDER={'0'}>}AMOUNT))

MVP
MVP

Re: Expression to calculate revenue invoiced for today

=sum {$ <TRANDATE={$(vToday)},TRANSACTION_ORDER={0}>}AMOUNT)

Not applicable

Re: Expression to calculate revenue invoiced for today

This expression is at least not returning an error, but the amount I am getting is 0. It should be around 100K, so I need to figure out what I am still doing wrong.

mphekin12
Valued Contributor

Re: Expression to calculate revenue invoiced for today

Can you post a sample?

Not applicable

Re: Expression to calculate revenue invoiced for today

I figured out the issue. My TRANDATE field did not have the same date format as my vToday variable, so I just created a new TransDate field that has the same format. Now when I plug that field into the expression you gave me it is returning a value. Thank you for your help with the expression.