Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
falko_thom
Contributor III
Contributor III

Problem with set analysis, less / greater than - reference to separate table

Hello,

I got some problem I quite don't understand.

There are two different tables. One:

valuemin_daysmax_days
0.2520999
0.811020
1.38510
1.9435
2.5003

Second:

dateyr_quactionduration
2012-11-232012-3a1
2012-11-242012-3a8
2012-11-252012-3a3
2012-11-242012-3b7
2012-11-262012-3b2
2012-11-262012-3a1
2012-11-272012-3a1
2012-11-252012-3b5
2012-11-282012-3a10
2012-11-272012-3b19

I want to work out a table with the dimensions action, yr_qu.

Fomulas:

  • avg(duration) named as q_Dur
  • value depending on the duration: Avg ( {<q_Dur  = { '>[min_days]<=[max_days]'}>} value)

My new table shows action, yr_qu and q_Dur with correct values.

But the new value always shows the aggregate of alle yr_qu depending on the chosen action.

What am I doing wrong?

I am really thankful for your help!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

1. If q_Dur is an expression or a calculated dimension instead of a field created in the script then you cannot use it as field name in the set modifier.

2. intra-record comparisons like SomeField = { '>[min_days]<=[max_days]'} often don't work unless SomeField uniquely identifies the records for which you want to aggregate. See attached example for an explanation.

That means you probably have to use an if statement instead.


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

1. If q_Dur is an expression or a calculated dimension instead of a field created in the script then you cannot use it as field name in the set modifier.

2. intra-record comparisons like SomeField = { '>[min_days]<=[max_days]'} often don't work unless SomeField uniquely identifies the records for which you want to aggregate. See attached example for an explanation.

That means you probably have to use an if statement instead.


talk is cheap, supply exceeds demand