Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Yesterday

How to get the yesterday value from date field

eg:

Datefield

yesterday-11/27/2012

count(orders) for yesterday(11/27) is some x amount how to get this?

6 Replies
Not applicable

Re: Yesterday

Hi..

Today()-1=yesterday

if(datefield=Today()-1,Count(Orderes))

Hope it helps u

Regards,

Kabilan K.

MVP
MVP

Re: Yesterday

Hi,

You will get Yesterday date by subtracting 1 from todays date. 

yesterdayDate = Today() -1

Internally the date is stored as number.

In expression you can use like this

=Sum({<DateDimension={'=$(=Today()-1)'}>} Sales)

Hope this helps you.

Regards,

Jagan.

akbar_art
New Contributor

Re: Yesterday

Hi

you can use

LET Vyesterday = today()-1;

expression :

=count({$<Day={$(=max(Day($(Vyesterday))))}>} orders)

Hope this helps you.

Regards,

Akbar

Not applicable

Re: Yesterday

i tried the above conditions its not working it shows null

order date is the date field

need to calculate the yesterday count(order) for order date.

sivarajs
Valued Contributor II

Re: Yesterday

count({$<orderdate={"=$(=date(orderdate)-1)"}>}order)

MVP
MVP

Re: Yesterday

Hi,

Did you tried this

=Sum({<DateDimension={'=$(=Today()-1)'}>} Sales)

If it not works then check where there is any Date format mismatch.

Regards,

Jagan.

Community Browser