# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a \$200 Amazon Gift Card! Watch Video
cancel
Showing results for
Did you mean:
Creator

## previous month filter date

Hello everyone,

I need to set an expression like this:

One is: if the user filter from aug 21º to sep 10º,

the other expresison needs to have the result of the same days but from the last month: jul 21º to aug 10º.

How could I do that?

e.g.

Diesel consumption:

from aug 21º to sep 10º = 21,2

set expression: jul 21º to aug 10º = 19,6

Tks

1 Solution

Accepted Solutions
Specialist

Hello, Samuel!

In set expression you can use Addmonths() function with Max() or Min() for indicating a range of output dates.

4 Replies
Specialist

Hello, Samuel!

In set expression you can use Addmonths() function with Max() or Min() for indicating a range of output dates.

Something along this pattern:

Sum{<Date = {">=\$(vMinDate) <=\$(vMaxDate)"}>} Amount)

Assumes that the min and max are defined in the correct date format, that the fact table date field is called Date. I have also added overrides so that the date selection does not interfere with the second expression. If this does not work you will need more information to give more specific help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Creator

Got it with this: