Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Total days

Hi All, 

I am trying to find out the total number of days for a tickets is opened or it got closed . 

to do so I am using  the below formula 

Num(CreatedDate-ClosedDate) 

the above expression is giving me the right days the ticket gets closed ... But there is a scenario where  there is a createdDate and the ticket is still not closed  therefore it should show the total days till today , Please refer below screenshot for reference . I want to display the total number of days from created date when there is no Closed date. 

smilingjohn_0-1662032765211.png

 

How can I achieve this.

Thanks in advance 

Labels (4)
1 Solution

Accepted Solutions
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

 

Like @Or said :

Num(CreatedDate-alt(ClosedDate,today())) 

 

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

5 Replies
MatheusC
Specialist II
Specialist II

Olá @smilingjohn 

tente Count (distinct Período Data)

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
Or
MVP
MVP

alt(ClosedDate,today())

smilingjohn
Specialist
Specialist
Author

Hi Champion, 

I think I was not able to explain you properly . 

With the current formula I am getting the total number of days but I am nt getting the total days when the closed date is null . It should show me the days from created date till today please refer below screenshot 

smilingjohn_0-1662033042358.png

 

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

 

Like @Or said :

Num(CreatedDate-alt(ClosedDate,today())) 

 

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
Or
MVP
MVP

alt(ClosedDate,today()) 😉

This just means if ClosedDate is null, use today's date instead.