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: 
ankur_abhishek
Contributor III
Contributor III

Create Column in Script

Hi ,

I want to create the below Time column at script level instead of a pivot table in UI.

I have use this formula to calculate Time (:

If(Dimensionality() > 2,

Interval(

If(RowNo()=1,0,If(RangeSum(page_viewed_datetime,-Above(page_viewed_datetime))> 0,

RangeSum(page_viewed_datetime,-PTime))),'mm'),

Interval (Max({<page_viewed={'Logout Page'}>} page_viewed_datetime)-

Min({<page_viewed={'Login Page'}>} page_viewed_datetime),'mm')

)

It calculating the time an user stay on a Page

fff.JPG

Kindly help me in creating calculated column (Time) .

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Ankur,

See Attachment.

Field is PTime1.

Regards,

Antonio

View solution in original post

5 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi,

May be like this for [Time] field

Time(Timestamp#(page_viewed_datetime, 'MM/DD/YYYY hh:mm'))


Regards,

Andrey

ankur_abhishek
Contributor III
Contributor III
Author

HI Andrey ,

My requirement is different i want to know how much time user stay (browser) the page. for that i have used expression as mentioned above.

Can you help me in creating a column in script.

Thanks

Ankur

antoniotiman
Master III
Master III

Hi Ankur,

See Attachment.

Field is PTime1.

Regards,

Antonio

ahaahaaha
Partner - Master
Partner - Master

May be like at attached file

ankur_abhishek
Contributor III
Contributor III
Author

Thanks Antonio