Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Not applicable

Dimension Limits - Last 21 days of data

Hi all,

I have done some reading on the community, but have not seemed to find an answer that works with my data to display the last 'x' days of data.

I have been trying to make this expression work in a pivot table:

This is how my variable looks:

Any help would be greatly appreciated.

4 Replies
Highlighted
agomes1971
Valued Contributor II

Re: Dimension Limits - Last 21 days of data

Hi,

isn't easier to do it like this?

=sum({<Date = {'$(=Date(today()-21))'}>} Amount)

HTH

André Gomes

Highlighted
MVP & Luminary
MVP & Luminary

Re: Dimension Limits - Last 21 days of data

Your vMaxDate is of the string format like MM/DD/YYYY and therefore needs to be quoted in the expression. You can see this by leaving the Expression label blank to see what gets substituted in the expression.

I recommend you try using the numeric form of the date instead. ie define vMaxDate as:

=max(DATE)

-Rob

Highlighted
Not applicable

Re: Dimension Limits - Last 21 days of data

Rob - thanks but this does not seem to work, nothing seems to be displayed in the pivot table (nothing to do with the 'Amount' field)

This is after I have changed the variable to:

    

Thanks

Highlighted
MVP & Luminary
MVP & Luminary

Re: Dimension Limits - Last 21 days of data

What does the expression look like after the substitution? (In the chart column heading).

-Rob