Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

The Date Challenge!

Hi Experts!

I've a simple table with ID, OrderDate and Sales.

tab1.PNG

I also have another table which is not linked with the above table. This table has a list of dates like a calendar.

tab2.PNG

I want to be able to select any date from Calendar and then show all the OrderDate which >= Calendar Date and <= CalendarDate+15days.

For example if I select date 01/04/2016 I get this list:

tab3.PNG

Now what I actually want is a straight table that looks like this:

tab4.PNG

Is this something possible?

14 Replies
Anonymous
Not applicable
Author

I'm attached the app and the data if anyone can have a look!

PrashantSangle

Hi,

what is your dimension??

use calendar date as your dimension.

Expression

sum(if(orderDate<=CalendarDate and orderDate>=CalendarDate+15,Sales)

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
karthiksrqv
Partner - Creator II
Partner - Creator II

Hi,

Try this as your calculated dimension:

=aggr(sum(distinct{<OrderDate={">=$(=max(Calendar))<=$(=max(Calendar)+15)"}>} OrderDate),OrderDate)

Do this after ensuring that both OrderDate and Calendar are in the number format during data-load. Manage the date-display format in the display objects.

sunny_talwar

May be you meant this (incorrect signs )

Sum(If(OrderDate >= Calendar and OrderDate <= (Calendar+15), Sales))

Capture.PNG

tresesco
MVP
MVP

Like this?

Capture.PNG

PrashantSangle

thanks sunny

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Yes this might work. I'll do further testing on this but is there anyway I can see the repeated Code and sales value as soon as they become available in the chart. like this?

tab5.PNG

Anonymous
Not applicable
Author

ideally i want to have the calculated dimension rather than building this logic in expression.

Anonymous
Not applicable
Author

Hi Karthik

I want this logic to be build in calculated dimension not at the expression level.