Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Husky_Bab12
Contributor
Contributor

Set analysis with Date

Hi ,

I need to sum quantity based on input dates with below expression. Please, some one help let me know where I'm going wrong

=sum({<$(='[Shift Date]')={">=$(vStart)<=$(vEnd)"}>} Quantity)

The shift date is in the format, 2022-Sep-02. 

I'm receiving 0 no matter the input I give on vStart and vEnd.

Where , vStart= 0 and vEnd = 0. 

Labels (1)
7 Replies
Lisa_P
Employee
Employee

Try just using the field [Shift Date] instead of $(='[Shift Date])

Husky_Bab12
Contributor
Contributor
Author

I tried the below its still giving me 0.

=sum({<[Shift Date]={">=$(vStart)<=$(vEnd)"}>} Quantity)

Lisa_P
Employee
Employee

What does it show in the expression editor at the bottom of the screen ? This should give you a clue to the issue.

Husky_Bab12
Contributor
Contributor
Author

It says expression okay. I think it is because of the shift date format. what do you say?

Lisa_P
Employee
Employee

Is the Shift Date detected as a date in the data or a string ? What format are your variables showing ?

Husky_Bab12
Contributor
Contributor
Author

it is loaded in date format.

Vegar
MVP
MVP

Try this

=sum({<[Shift Date]={">='$(vStart)'<='$(vEnd)'"}>} Quantity)