Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
jduluc12
Contributor

Date expression

Hi,

Suppose if today is 03/23/2017 and i want to build an expression for sum of amount

from 04/23/2016 to 05/23/2016 then how to build it.

what should be the set analysis for it?

sum({<>}Amount).

Thanks,

Jean

Tags (1)
1 Solution

Accepted Solutions
Highlighted

Re: Date expression

May be this

Sum({<DateField = {"$(='>=' & Date(AddYears(AddMonths(Today(), 1), -1)) & '<=' & Date(AddYears(AddMonths(Today(), 2), -1)))"}>}Amount)

View solution in original post

2 Replies
Highlighted
laddu_927
Valued Contributor

Re: Date expression

Try something like this by creating a datenum field

{<numDate = {">= $(=num(Max(AddMonths(Date,-10)))) <=$(=num(Max(AddMonths(Date,-11)))) "}>}

Highlighted

Re: Date expression

May be this

Sum({<DateField = {"$(='>=' & Date(AddYears(AddMonths(Today(), 1), -1)) & '<=' & Date(AddYears(AddMonths(Today(), 2), -1)))"}>}Amount)

View solution in original post