Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help on a Expression Definition

Hi All

Im fairly new to Qlikview and needed some help on the syntax for the following expression definition.

This is what I am trying to achive:

Sum of

Amountfield

Divided by

Number of days between Datefield1 & Datefield2

Multiplied by

Number of days between Datefield1 and the current system date.

AmountField / (DateField1 - Datefield2) x (Datefield1 - systemdate)

Any advise would great!

Thanks

3 Replies
Anonymous
Not applicable
Author

How the expression will look depends on your data, most important your datefield format.

I would suggest to make seperate expressions first.

so :

Expr1       = Sum(AmountField)

Expr2       = (DateField1 - DateField2)

Expr3       = (DateField1 - systemdate)

And then see whiche will work and which not.

Depending on the format of your date field you should convert them to a number field to make it easier to calculate with.

fe          num(DateField1)

Anonymous
Not applicable
Author

PS For systemdate you could use:

Today(2)

Not applicable
Author

Cheers Dennis Ill give this another shot and see how I get along!