Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get one field value by another field value

datenum
2016/01/018
2016/01/024
2016/01/035
2016/01/0484
2016/01/0516
2016/01/068

I need to filter the num by date with expression.

1. Get num from 2016/01/02 to 2016/01/04.

2. Get num of 2016/01/05

It's looks easy but I don't know to do.

Any help will be thanks.

4 Replies
shawn-qv
Creator
Creator

You may try (simple):

sum(if(date>=date('2016/01/02') and date<=date('2016/01/04'), num, 0))

or using set analysis (advance):

sum({<date = {">=date('2016/01/02')<=date('2016/01/04')"}>} num)

S.

adamdavi3s
Master
Master

If you want to display the literals rather than a sum then this should work

=only({<date={'2016/01/05'}>}num)

= concat({<date= {">=('2016/01/02')<=('2016/01/04')"}> } num,',')



sunny_talwar

Here are some more options

1) =Sum({<date = {"$(='>=' & Date(MakeDate(2016, 1, 2)) & '<=' & Date(MakeDate(2016, 1, 4)))"}>} num)

2) =Sum({<date = {"$(=Date(MakeDate(2016, 1, 5)))"}>} num)

Capture.PNG

Not applicable
Author

maybe this