Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Values for last date

Hi all,
I am trying to select some totals, but only for yesterday.
However my formula doesn't work (and I realise that the first two values are redundant.
Please help! Thanks in advance,
Wouter
sum
({$<
JAAR = {$(vYear) },
Periodenummer = {$(vPeriod) },
DATUM =  {$(Date(vYesterday)) }
>}
AANTAL)
My yesterday variabele is set by this line:
LET
vYesterday = Num(Now())-1;
3 Replies
swuehl
MVP
MVP

Wouter,

Now() will return a Timestamp with decimal places, while I assume your DATUM values are integer values in numerical representation. Consider using Today() instead.

Then, do the Date formatting also in your variable definition:

LET vYesterday = Date(Today(1)-1);

Thus your DATUM set element modifier looks like

DATUM =  {$(vYesterday) }

Not applicable
Author

Hi Swuehl,

thank you, I didn't know the difference between Now() and Today().

I have changed the formula's, but without success.   Any other ideas?

swuehl
MVP
MVP

First check, that your DATUM values are integer values, too, e.g. by creating a list box with field DATUM and an additional expression num(DATUM). Should only show integer values like 40933.

Then check that your DATUM field values use also the standard date format, which is used in formatting Date(today(1)).

Check that your DATUM field has a value for today..

Lastly, try enclosing your variable values in single quotes:

DATUM =  {'$(vYesterday) '}