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: 
Anonymous
Not applicable

two dates issue

Hi all,

i have two tables and a master calendar

table1:

Id

Orderdate

Orderdate as date

Sales

Tables:

Id

Deliverydate

Deliverydate as date

Now, the above two tables are linked with a common field. i have created a master calendar with the date field from those two tables.

My requirement is , when i select a range of dates from deliverydate i need the sum of sales for that range of dates in the orderdate.

For example:

if i select a range in date (1st jan 2016 to 5th jan 2016)  then,

the deliver date range should be 1st jan 2016 to 5th jan 2016 and order date also should be between 1st jan 2016 to 5th jan 2016 . so that i can sum the sale based on the order date .


advance thanks


thanks,

anusha

7 Replies
MK_QSL
MVP
MVP

Not applicable
Author

Hi,

You can also use Flag to differentiate two different tables and use Flag='Order' while calculating sum(Sales) from order table.

Anonymous
Not applicable
Author

Hi

i have given a scenario out of my requirement. But in my dashboard i am using 10 dates fields from 5 different tables and are joined to master calendar.

Kindly help me out for my requirement posted.

Uday_Pasupuleti
Partner - Creator III
Partner - Creator III

1.Create a seperate Master calender(Data Island) without any association.

2.Creat 2 variables with min and max dates from the calender.

3. In the script use sum({<Orderdate={'>=$(vMinDate)<=$(vMaxDate)'}>}sales)

or you can use sum({<Orderdate=P(Date}>}sales)

MK_QSL
MVP
MVP

Provide proper sample data or sample application..!

Anonymous
Not applicable
Author

PPlease help on ‌based on other date

Uday_Pasupuleti
Partner - Creator III
Partner - Creator III

Did you try the expression provided by Avinash R?

It should work by the looks of it.