Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script Help

How do u convert the following in qlikview syntax.. sorry am very new coming from a sql background so i might have a look of silly questions today considering the project am working on

TRUNC("POL_PAID_TO_DATE" - "POL_CRT_DATE") / 31) As "Converted Count",

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

The QlikView Floor() function does almost the same as the SQL TRUNC(). Further, to quote fields, you can use either double quotes "" or square brackets [] in QlikView. Hence, the following should work:

Floor(("POL_PAID_TO_DATE" - "POL_CRT_DATE") / 31) As "Converted Count",

HIC

View solution in original post

4 Replies
its_anandrjs
Champion III
Champion III

Hi,

Write some thing like

(POL_PAID_TO_DATE - POL_CRT_DATE) / 31 as [Converted Count]

Regards,

Anand

hic
Former Employee
Former Employee

The QlikView Floor() function does almost the same as the SQL TRUNC(). Further, to quote fields, you can use either double quotes "" or square brackets [] in QlikView. Hence, the following should work:

Floor(("POL_PAID_TO_DATE" - "POL_CRT_DATE") / 31) As "Converted Count",

HIC

its_anandrjs
Champion III
Champion III

Hi,

You can use Ceil of Floor functions for this like

Ceil( (POL_PAID_TO_DATE - POL_CRT_DATE) / 31) as [Converted Count]

Floor( (POL_PAID_TO_DATE - POL_CRT_DATE) / 31) as [Converted Count]

Regards,

Anand


Not applicable
Author

Thanks alot it worked