Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to switch between today and yesterday

Good morning all,

i have the following problem:

I have data with a calender-dates.

day(Export_Zeitstempel)&' '&month(Export_Zeitstempel)&' '&Year(Export_Zeitstempel) as  Export_Zeitstempel_Anzeige_Tag,

My calender is called: Export_Zeitstempel_Anzeige_Tag

Now, I would like to visualise two text-bosxes which switch between today and yesterday.

My solution was:

for today:

=MaxString(Export_Zeitstempel_Anzeige_Tag)

for yesterday:

=(MaxString(Export_Zeitstempel_Anzeige_Tag))-1

Both doesn't really work.

Any ideas? Thank you for helping.

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Robert,

If  Export_Zeitstempel is Date Field

in script

Date(Export_Zeitstempel,'DD MM YYYY') as Export_Zeitstempel_Anzeige_Tag

Yestarday

Date(Max(Export_Zeitstempel_Anzeige_Tag) -1)

Regards,

Antonio

View solution in original post

25 Replies
antoniotiman
Master III
Master III

Hi Robert,

If  Export_Zeitstempel is Date Field

in script

Date(Export_Zeitstempel,'DD MM YYYY') as Export_Zeitstempel_Anzeige_Tag

Yestarday

Date(Max(Export_Zeitstempel_Anzeige_Tag) -1)

Regards,

Antonio

qlikview979
Specialist
Specialist

Hi  may be this

Today:-

DATE(max(Export_Zeitstempel_Anzeige_Tag))  as Today

Yesterday

DATE(max(Export_Zeitstempel_Anzeige_Tag)-1)  as Yesterday


Regards,

Mahesh

Anonymous
Not applicable
Author

for today:

=MaxString(Export_Zeitstempel_Anzeige_Tag)

for yesterday:

=Date((MaxString(Export_Zeitstempel_Anzeige_Tag))-1)

Anonymous
Not applicable
Author

Thank you, but it doesn't work.

Anonymous
Not applicable
Author

THX!

It is working fot today;

but not for yesterday.

antoniotiman
Master III
Master III

Can You share any values of Export_Zeitstempel in Your Data ?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Date(Date(MaxString(Export_Zeitstempel_Anzeige_Tag))-1)


Regards,

jagan.

Anonymous
Not applicable
Author

sorry, doesn't work.

qlikview979
Specialist
Specialist

may be this will work

DATE(max(Export_Zeitstempel_Anzeige_Tag)-1)  as Yesterday