Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
wuming79
Contributor

Qlikesense: timestamp not showing after if function

Reference: https://community.qlik.com/t5/New-to-Qlik-Sense/Bar-Chart-to-show-last-7-days-with-epoche-converted-...

I wanted to show the last 7 days data with 

=If((datetime>=Date(Today()-7)) and (datetime <= Date(Today())), datetime)

datetime is loaded as 

timestamp((timestamp/86400 + 25569 + 8/24),'DD/MM/YYYY h:mm:ss[.fff] TT') as datetime,

I have a timestamp column as below. I thought the above expression was ok but later I found out that it did not show the data after 26/12/2018 1200am. If I remove the expression and replace it with just datetime, I can see the data after 12am.  

Anyone know why this is happening?

missing timestamp 2.PNGtimestamp datamissing timestamp 1.PNGWith Expressionmissing timestamp 3.PNGwithout expression

 

1 Solution

Accepted Solutions

Re: Qlikesense: timestamp not showing after if function

May be try this

=If((datetime >= Date(Today()-7)) and (datetime <= Date(Now())), datetime)

or try this

=If((datetime >= Date(Today()-7)) and (datetime <= Date(Today() + 1)), datetime)
2 Replies

Re: Qlikesense: timestamp not showing after if function

May be try this

=If((datetime >= Date(Today()-7)) and (datetime <= Date(Now())), datetime)

or try this

=If((datetime >= Date(Today()-7)) and (datetime <= Date(Today() + 1)), datetime)
wuming79
Contributor

Re: Qlikesense: timestamp not showing after if function

+1 works!!! thanks!!