Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
malimohammed
Partner - Contributor
Partner - Contributor

Dates Comparison in Set Analysis

Hello,

We need to compare date fields in set analysis expression. These dates are in different tables and are not linked with each other. Let me elaborate. I have three dates nOpenDate, nClosedDate and a MasterDate. nOpenDate and nClosedDate are in a the same table whereas MasterDate is a date created using MasterCalendar Script which is not linked to any table in the Data Model.

The requirement is to count Open and Closed Incidents on a particular date(MasterDate). If we would have linked the master date to our incident table which contains nOpenDate & n ClosedDate using any one of them I would get the count based on the date which has been linked to MasterDate which is not needed.

I'm trying to create a bar chart using MasterDate as dimension and using the following expression:

Count Open Tickets on a Particular Day: count({<nStatus={'Open'},MasterDate={'Date(nOpenDate)'}>}ItemID)

Count of Closed Tickets: count({<nStatus={'Closed'},MasterDate={'Date(nClosedDate)'}>}ItemID)

    The issue is I'm getting the same count for all the dates which is incorrect. Each day should have its respective open and Closed incident count. I believe I'm missing something or the logic is incorrect.

    I would appreciate if someone could help me in this regard.

master_open_close.JPG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I would suggest using a canonical date instead:

Canonical Date

View solution in original post

2 Replies
swuehl
MVP
MVP

I would suggest using a canonical date instead:

Canonical Date

malimohammed
Partner - Contributor
Partner - Contributor
Author

Ultimate Solution.. Thanks a lot.. It resolved my issue.