Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

pratap6699
Contributor

Issue in Calenderobject with variable

Hi Folks, iam expecting that my issue will resolved from community,

there is 2 calender objects i select from date to date as daterange dynamically from calender objects through variables, i need to implement set expression , total dates are feb01/2016 to de2016 from that date range when i select on march month the sum(sal) is 380 but my expression showing 0.

sum({<date={'>=$(FromDate)<=$(ToDate)'}>}sal) kindly modify my set expression

1 Solution

Accepted Solutions
raajaswin
Contributor III

Re: Issue in Calenderobject with variable

Try this .

=sum({<date= {">=$(=min(date(vFromDate,'DD-MM-YYYY')))<=$(=max(date(vToDate,'DD-MM-YYYY')))"}> } sal)

4 Replies
raajaswin
Contributor III

Re: Issue in Calenderobject with variable

Try with triggers.

Please Find the attached app

Set trigger for both variables vFromDate and vToDate

=('>=' & (date((vFromDate),'DD-MM-YYYY')) & '<=' & (date((vToDate),'DD-MM-YYYY')))

As it is already linked. just give sum(sal) in text box. set analysis is not required in this case

pratap6699
Contributor

Re: Issue in Calenderobject with variable

It works fine, Thanks for ur time.

my requirement is by using set expression is it possible, by when user selecting date range automatically that results should displayed. very great ful to you if resolved this...

=sum( if ( date >= $(vFromDate) and  date <= $(vToDate), sal))

by using this expression i got the result what i expected, my question is convert this expression into set expression.

raajaswin
Contributor III

Re: Issue in Calenderobject with variable

Try this .

=sum({<date= {">=$(=min(date(vFromDate,'DD-MM-YYYY')))<=$(=max(date(vToDate,'DD-MM-YYYY')))"}> } sal)

pratap6699
Contributor

Re: Issue in Calenderobject with variable

Hi Bro,

well done...Awesome.. very helpful. Thank you.

Community Browser