Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart with two diferent date field

Hi guys,

i have a table with two date informations: Contract Date and Cancel Date. One is the date that a client bought a service and the other is when the client cancel the contracted service.

I want do create a bar chart, that i see: January/2011, the quantity of clients that bought the service and the numbers of clientes that canceled it in this month.

I don´t want to make a chart based on the cancel date field or contract date field, i need to compare the two dates with a third date. Any idea how can i do it?

Thanks!

4 Replies
giakoum
Partner - Master II
Partner - Master II

Please clarify what you mean i need to compare the two dates with a third date

Compare in what way?

Or
MVP
MVP

Set up a third calendar table, which is not attached to any other tables. Make sure it has a value for every day (even if there are no new contracts / cancellations that day).

I've attached an example file - I haven't done this since set analysis was introduced, so there's almost certainly a cleaner way to do it now, but this should get you moving in the right direction. Note that the tables are partial to save time, but your actual date table should be full, of course.

giakoum
Partner - Master II
Partner - Master II

count({$<[Contract Date]=[Graph Date]>} [Contract Date])

but count is not recommended, so add something like 1 in your load of each record and then sum it instaed of counting it.

Not applicable
Author

I am getting an error when I typed

count({$<[Contract Date]=[Graph Date]>} [Contract Date])

are you sure the syntax is correct.

Thanks