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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
parpatra
Partner - Contributor III
Partner - Contributor III

Report based on diff dates

Hi All,

I have a data in this format:

App NoApp dateClosedClosed date
1JanYesJan
2JanYesFeb
3JanNo
4FebYesFeb
5FebYesMar
6FebNo
7MarYesMar
8MarYesApr
9MarNo
10AprYesApr
11AprYesMay
12AprNo
13MayYesMay
14MayYesJun
15MayNo
16JunYesJun
17JunYesJun
18JunNo


I need to show a ratio between closed/total number of applications grouped by month.

So for Jun, ratio=count(all apps which have closeddate in Jun)/[Count(all app which have app date in june)+count( all apps which are closeddate in june and have appdate in previous months)]

This evaluates to 3/[3+1]=3/4=0.75

I am facing a problem to create a list box showing month, which I intend to create from the Appdate. The expression refers both the closed date and appdate,I am not able to make sure which one to use as my dimension in a chart to show the ratio across months.

1 Solution

Accepted Solutions
Anonymous
Not applicable

You can create list of months as data island, and use it as dimension in your chart. Expression will be using conditions, like (more or less):
count (if(appdate=Month, AppNo)) or count (if(closedate=Month and closedate> appdate, AppNo))

View solution in original post

5 Replies
Anonymous
Not applicable

You can create list of months as data island, and use it as dimension in your chart. Expression will be using conditions, like (more or less):
count (if(appdate=Month, AppNo)) or count (if(closedate=Month and closedate> appdate, AppNo))

parpatra
Partner - Contributor III
Partner - Contributor III
Author

Thanks Michael...

I am pretty new with QV and not aware of 'data island'...can you please help me with an example.

Is it like a dummy table with all the date information?

johnw
Champion III
Champion III

You could merge your two dates into one date field, distinguished by activity. The Closed field would be on a separate table to avoid duplication, or simply calculated on the fly from the existance of a closed date.

App No, Closed
1, Yes
2, Yes
3, No
etc.

App No, Activity, Date
1, Applied, Jan
1, Closed, Jan
2, Applied, Jan
2, Closed, Feb
3, Applied, Jan
etc.

And if I understand correctly:

ratio = count({<Activity={'Closed'}>} distinct "App No")/count(distinct "App No")

Edit: Renamed field "Date Type" to "Activity", which I think better describes the contents of the field.

Anonymous
Not applicable

It's a table not linked with any other table in the data model. In your case it will be one field, Month, with all Month values you may need. You can create it, for example, like this, if the source fields contain correct values, so get only values you need and nothing more than that:


MonthDataIsland:
LOAD DISTINCT
"App date" as Month
RESIDENT DataTable;
CONCATENATE LOAD DISTINCT
"Closed date" as Month
RESIDENT DataTable;


parpatra
Partner - Contributor III
Partner - Contributor III
Author

Thanks fro your suggestions...

I will try these options and get back to you if needed...