Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
anitamelbye
Creator
Creator

Set Analysis - how to show value greater than..

Hello all you clever People!

I'm kind of New to Qlikview, and I'm sorry for this kind of simple question.

I have a "minor" problem, and I have now spendt "numerous hours" trying to figure this out, and I need som help.

I am loading an Excel-sheet With over 200.000 lines, but I have tried to simplifyed it here in my excample 🙂

   

NumberValuerefRefDate fromDate toValue
10000I00101.01.201531.12.2099100
10001I0011000101.01.201531.12.201580
10001I0011000101.01.201631.12.209960
10002I00101.01.199431.12.2013100
10003I0011000301.01.201531.12.2099100

I would like the chart-pivot to give me follow result:  

10000100
1000180
10002100
10003100

I either get nothing at all, or I get number 10001 to give me value 140.

I have read "all" the greater than-treds I have found on this forum, and I have tried maybe over 100 differens ways to write my set-sentence, but I just can not figure it out..

So please, help me, anyone? 🙂

Best regards,

"in love with QV"

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think you also need to limit Date from values:

=sum({<[Date to]= {">$(vLimit)"}, [Date from] = {"<$(vLimit)"}>} Value)   and letting vLimit = 29.12.2015

And if you want to use reference dates e.g. as dimension in a chart, maybe have a look at:

Creating Reference Dates for Intervals

View solution in original post

9 Replies
Gysbert_Wassenaar

sum({<Value={'>60'}>}Value)


talk is cheap, supply exceeds demand
anitamelbye
Creator
Creator
Author

Thank you for giving such a quick reply.

I may not have been very specific in my request; I will try to reformulate :

When today is dec 29. 2015, I would like the value to show 60. But NeXT year I would like the value to show 80.

Do you have any suggestion, I would be happy to try it out 🙂

Gysbert_Wassenaar

Create an input box with a variable (for example vLimit) and use the variable in the expression: sum({<Value={'>$(vLimit)'}>}Value). That way users can change the value of the variable at any time and the expression will use the value the user gave the variable.


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

I haven't really understood how you use your from and to dates.

Shouldn't you show 80 this year and 60 next year for number 10001? And Nothing today for number 10002?

anitamelbye
Creator
Creator
Author

I will try to explain swuehl 🙂

My numbers are employee-numbers, and value indicates how much they work in %.

They all work 100% except for employee 10001, who only Works 80% this year, and will start to work 60% from next year. Was that a good explanation? 🙂

anitamelbye
Creator
Creator
Author

I tried to write following:

=sum({<[Date to]={'>$(vLimit)'}>}Value)   and letting vLimit = 29.12.2015

But, I'm sorry to say, it dit not give the right answer,

swuehl
MVP
MVP

I think you also need to limit Date from values:

=sum({<[Date to]= {">$(vLimit)"}, [Date from] = {"<$(vLimit)"}>} Value)   and letting vLimit = 29.12.2015

And if you want to use reference dates e.g. as dimension in a chart, maybe have a look at:

Creating Reference Dates for Intervals

anitamelbye
Creator
Creator
Author

I will definitely look in to how to create Reference date for Intervals, that is excatly what I need. Thank you for giving me that link.

I changed your sentence to:

=sum({<[Date to]= {">=$(vLimit)"}, [Date from] = {"<=$(vLimit)"}>} Value) , and now it works!

THANKS A MILLLION! (Now I can sleep tonight) 🙂

rohityadav5
Contributor
Contributor

Miss You!!