Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
wuming79
Creator
Creator

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?

timestamp datatimestamp dataWith ExpressionWith Expressionwithout expressionwithout expression

 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

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)

View solution in original post

2 Replies
sunny_talwar

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
Creator
Creator
Author

+1 works!!! thanks!!