Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Display last month Value

Hi Community,

I need to display the value of the last month and only the last month. I used a text field and the following expression:

= 'Last month: ' &
num(sum({<MonthYear ={"$(='>=' & Max(MonthYear))"}>}  Sales) )

When there is not period selection, there is the right display but when I selected a period (month, Year, ..) the value changes. How to modify the expression in order to have the same value indepent from the sélections we can made?

Thank you,

William

1 Solution

Accepted Solutions
MVP
MVP

Re: Display last month Value

You can use the set identifier 1 to ignore all user selections:

= 'Last month: ' &
num(sum({1<MonthYear ={"$(='>=' & Max({1} MonthYear))"}>}  Sales) )

View solution in original post

2 Replies
MVP
MVP

Re: Display last month Value

You can use the set identifier 1 to ignore all user selections:

= 'Last month: ' &
num(sum({1<MonthYear ={"$(='>=' & Max({1} MonthYear))"}>}  Sales) )

View solution in original post

Highlighted
Not applicable

Re: Display last month Value

Thank you swuehl! Your expression works great!

Finally I have found this expression :

sum({1<Date={">=$(=MonthStart(Today(), -2))<=$(=Today())"}>}  Sales) and it also works!

Thank you,

Regards,

William