Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Problem

Hi guys, my problem is:

  • I have two tables: CLIENT and CALENDAR
  • They are joined by YEAR_MONTH
  • CLIENTE has a column called: INCLUSION_DATE
  • In CALENDAR i have YEAR_MONTH, YEAR, MONTH, DAY, DATE

I would like to select YEAR=2016, MONTH=MAR and create a line chart that give me how many CLIENTs i have day by day of the whole selected month, from the day 1 to the 30.

My set analisys was:

count(

{

  <INCLUSION_DATE={'<=$(=DATE)'}>

}

CLIENT)

It works when i select just one DATE. But when i select the month the chart show me nothing.

My expectation is someting like this:

image1.png

13 Replies
Anonymous
Not applicable
Author

Thanks sunny.

These two fields represent different things:

  • INCLUSION_DATE: Represents the date my Client accepted my promotion (another table that doesn't matter for now)
  • YEAR_MONTH: Represents the CLIENT register datas on YEAR and MONTH selected.
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Your uploaded document shows something else than what you mentioned in your OP. A flat line from day one. This is to be expected as the granularity of your key connectiing Calendar to Client is at the month level, meaning that it produces the same set of clients for every day in a month. Can you add the actual date to the key and let the calendar decide on what granularity to use?

Also from your original picture it seems like you want to accumulate the number of clients. Take that into account when setting the expression properties.

Best,

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Also keep in mind that set analysis produces a reduced/expanded data set before the object/chart is recalculated and not a different set row-by-row in your table or chart. This accounts for your initial problem whereby the chart works for a single date (field DATE in set analysis returns a single value) and not for any other selection (DATE returns multiple values which translates to NULL in the $-substitution expression). Result: no INCLUSION_DATE matches the condition.

Best,

Peter

Anonymous
Not applicable
Author

Yeah Peter! Thanks for your attention and response.

And thats the point, the granularity. But as this change will take me a hard work (my app is not only that a sent. That are a lot of others tables in my cloud). So changing this join from CLIENT to CALENDAR will broken all of my app.

Thats the reason i'm trying to implement that vision by day using set analisys.

Thanks