Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
shamad
Contributor II
Contributor II

2 Dates Set Analysis

Hi all,

I have two calendars and two Variables : the first to vStartDate and the second to vEndDate.

My problem is when i selected a date to Calendard vEndDate the Formule is it OK but it isn't OK when the i selected a date with the Calendar vStartDate,

This expression my return sum(qty) with ReceptionDate <=vEndDate. and not between the 2 dates

I would have the sum(qty) where ReceptionDate >= vStartDate and ReceptionDate <= vEndDate

=sum({<ReceptionDate={">=$(=date(vStarttDate,'DD/MM/YYYY')) <=$(=date(vEndDate,'DD/MM/YYYY'))"}>}Qty)

Any help would be greatly appreciated. Thank you!

1 Solution

Accepted Solutions
Not applicable

Hello shamad,

I checked the syntax of your expression. It should work as "designed", perhaps even as you expect it 😉 Note that you wrote your variable vStartDate in your expression with double "t" . I assumed that one t as written in your text is correct.

=sum({<ReceptionDate= { "$(= '>=' & date(vStartDate,'DD/MM/YYYY') & ' <=' & date(vEndDate,'DD/MM/YYYY'))" }>} Qty )


Regards, Roland

View solution in original post

2 Replies
Not applicable

Hello shamad,

I checked the syntax of your expression. It should work as "designed", perhaps even as you expect it 😉 Note that you wrote your variable vStartDate in your expression with double "t" . I assumed that one t as written in your text is correct.

=sum({<ReceptionDate= { "$(= '>=' & date(vStartDate,'DD/MM/YYYY') & ' <=' & date(vEndDate,'DD/MM/YYYY'))" }>} Qty )


Regards, Roland

shamad
Contributor II
Contributor II
Author

Although Viewed
a big thank you