0

Example from Qlikview help:

sum( {$<Year = {“>1978<2004”}>} Sales )

I try this code, but it did't works

Count( {$<Damages.DamageDate = {">Min(OtherDate)"}>} Damages.Id)

Looks like qlikview did't support dates in inequalities. Any way if anyowne know how to do things like this please help.

gabba
  • 2,815
  • 2
  • 27
  • 48

4 Answers4

5

As I remember, you must use a dollar-sign expansion within the set expression. Look up "Set Modifiers with Dollar-Sign Expansions" in the manual. The Min function will then be evaluated and so the set expression should work.

It will look sg like this:

Count( {$<Damages.DamageDate = {">$(=Min(OtherDate))"}>} Damages.Id)

Or perhaps

Count( {$<Damages.DamageDate = {">$(#=Min(OtherDate))"}>} Damages.Id) 
John Conde
  • 217,595
  • 99
  • 455
  • 496
Imre Greilich
  • 3,272
  • 1
  • 15
  • 7
2

I'd use

// Reopen or share this result by using the following Url:
// http://tools.qlikblog.at/SetAnalysisWizard/?sa=J0LC

Count({$<[Damages.DamageDate]={">$(=Min(OtherDate))"}>}[Damages.Id])

Note: I think you should square brackets for qualified field names like "Damages.DamageDate". You can use the Set Analysis Wizard to change the expression.

Hope this helps!

Regards Stefan

Stefan Walther
  • 929
  • 1
  • 8
  • 30
1

Another posibility to your question is create a variable for example: vMinDate = Min(OtherDate)

And then you can use your variable in the expression like this:

Count( {$<Damages.DamageDate = {'$(vMinDate)'}>} Damages.Id)
sorak
  • 2,607
  • 2
  • 16
  • 24
dreTa
  • 27
  • 1
  • 3
-1

I not find the way how to calculate what I need in qlikview, but I workaround it by make all calculation in sql query.

UPDATE:

Also combination of count and if may be helpful. And don't forget place user selected values into document variables before use it in expressions

gabba
  • 2,815
  • 2
  • 27
  • 48
  • You asked for 'Inequality in Qlikview set expressions' then, imho, you should select the other answer (Qlikview-way). – smartmeta Sep 17 '13 at 12:05
  • In this answer I point to solution suitable for me - use combination of count and if expressions (see my update). I supose that qlikview-way to. So I votedup the another answer despite the fact that it is not useful to me. In much cases It will work and it looks like it useful to many. Also I uncheck my answer, so downvoter would be happy. – gabba Sep 17 '13 at 23:50