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

Creating calculated field from 2 dates with condition of specific status

Hi Guys

May i please get an assistance here, I need to calculate a new field on Data Manager to have OD4D (Overdue for Download) column, and i need to do this by saying if status field is not "Out of Service" then give me difference between LastConnectedDate field from Today's date. I wanna see the difference in days.

Attached is the logic but in PowerBI

Your support is highly appreciated. Thanks in Advance.

 

Regards

T

Labels (3)
1 Solution

Accepted Solutions
QFabian
Specialist III
Specialist III

maybe like this ? : 

If(Status = 'In Service',

If(today() - [Last Connected] > 3,
today() - [Last Connected], 0), 0)

QFabian_0-1664910874019.png

 

QFabian

View solution in original post

3 Replies
QFabian
Specialist III
Specialist III

Hi @Thabang231 , i think is very similar to your power BI expression :

QFabian_1-1664889153592.png

 

 

QFabian
Thabang231
Contributor III
Contributor III
Author

Hi @QFabian 

Thanks once again but at moment the values that are returning are not correct , please look at the snip below , "Out of Service -Attached" status should always remain Zero because the goods are not in used, and only do count of "In Service" as to see how many days difference from last Connected to today(). 

Hope to hearing from You, I am amazed with the Qlik community support.

🙂

Thabang231_0-1664907702034.png

 

 

QFabian
Specialist III
Specialist III

maybe like this ? : 

If(Status = 'In Service',

If(today() - [Last Connected] > 3,
today() - [Last Connected], 0), 0)

QFabian_0-1664910874019.png

 

QFabian