Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to Find sales between the range of date selected in Two different list box having source date from same field ?

Hi All ,


How to Find sum of sales between the range of dates selected in Two different list box having source date from same field .

In my qvw i have a single date of sale field . I have created two list box with names as , FROM DATE and TO DATE . But actually both of them refers to single date field .

My requirement is User should be able to select a date from ' FROM DATE ' List Box which should not let selection to happen in TO DATE list box . And hence when user selects a date from TO DATE list box .

Then user should get sum of sales between that range of dates and number of records selected within that range .

Thanks & Regards

Shekar

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

Attached a qvw with two solutions, one using variables

Sum({<Date={">=$(=Date(vFromDate))<=$(=Date(vToDefDate))"}>} Sales)

and the second using a second list box in an alternate state.

Sum({<Date={">=$(=Date(Min(Date)))<=$(=Date(Max({ToDate}Date)))"}>} Sales)

View solution in original post

2 Replies
shekhar_analyti
Specialist
Specialist
Author

I am able to Get it using alternate state . But i want to know if we can get it without using alternate state

stigchel
Partner - Master
Partner - Master

Attached a qvw with two solutions, one using variables

Sum({<Date={">=$(=Date(vFromDate))<=$(=Date(vToDefDate))"}>} Sales)

and the second using a second list box in an alternate state.

Sum({<Date={">=$(=Date(Min(Date)))<=$(=Date(Max({ToDate}Date)))"}>} Sales)