Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks I have table like this
| MINValue | MAXValue | Identifier |
| 0 | 0.012 | 0 |
| 0.012 | 0.0347 | 1 |
| 0.0347 | 0.1096 | 2 |
| 0.1096 | 0.3034 | 3 |
| 0.3034 | 0.6301 | 4 |
| 0.6301 | 1.5115 | 5 |
| 1.5115 | 3.4873 | 6 |
| 3.4873 | 12.9616 | 7 |
| 12.9616 | 101 | 8 |
t2:
| value | Monthnames |
| 0 | Jan-16 |
| 0.01 | Feb-16 |
| 0.05 | Mar-16 |
| 0.1 | Apr-16 |
| 0.1 | May-16 |
| 0.75 | Jun-16 |
| 0.2 | Jul-16 |
| 10 | Aug-16 |
| 10.5 | Sep-16 |
| 5.5 | Nov-16 |
| 50 | Dec-15 |
| 50.5 | Nov-15 |
| 3.7 | Oct-15 |
| 0.013 | Mar-15 |
| 0.01094 | Feb-15 |
| 1 | Jan-15 |
in my chart dimension is month names and expression is
like
if (sum(value)>minvalue and sum(value)<maxvalue,,1,0)
here I don't have any association between the 2 tables
I wanna do it in hart expression level
Create two variable minvalue1 , maxvalue1
Variable Expression :
minvalue1 = min(minvalue )
maxvalue1 = max(maxvalue )
Layout condition enable expression :
if (sum(value)>=minvalue1 and sum(value)=< maxvalue1,1,0)
it will work based on your current selection.
Hi Folks,
Thanks for ur response
My requirement is
like
I have 2 tables with no association
t1:
load * inline [
month,value
jan15,0.01
feb15,0.02
mar15,0.03
apr15,0.08
may15,1
jun15,2.5
jul15,10
aug15,20
sep15,35
oct15,100
nov15,100.1
dec15,125
];
in table 2 I have data like this
t2:
load * inline [
minvalue,maxvalue
0.01,0.03
0.04,1
2,25
26,50
51,100
100,105
];
here my re is I wanna creat a chart with table 1 data
dimension is month
and expression is
if(value>=0 and value <=0.03 ,'a',
if(value>=0.04 and value <=0.5 ,'b',
if(value>=0.6 and value <=1 ,'c',
if(value>=2 and value <=100 ,'d',
))))
this works well
but here instead of hardcoding the values in expression level ,
I wannna use min and max columns in this expression level .
where I have no association between the tables
>>i want to do this in chart expression level
I hope your data set is small...
Yes
Hi Qlik777,
I am having little confusion in understanding the requirement. However,
if (sum(value)>minvalue and sum(value)<maxvalue,,1,0)
If you are considering the max and min values from t1(min(value),max(value)) then you can achieve by using the variable for min and max values and then using set analysis.
What does the indentifier field in the t1 table refers to.
The selection for both the tables can be done when there is a linkage.
Hi Santhosh ,
can u refer to my previous reply's ,
I have posted with sample data and my clear requirement
Hey ,
Try this:
U said , data is not associated. by using this script data wil associate.
T1:
LOAD * INLINE [
MINValue, MAXValue, Identifier
0, 0.012, 0
0.012, 0.0347, 1
0.0347, 0.1096, 2
0.1096, 0.3034, 3
0.3034, 0.6301, 4
0.6301, 1.5115, 5
1.5115, 3.4873, 6
3.4873, 12.9616, 7
12.9616, 101, 8
];
T2:
LOAD * INLINE [
value, Monthnames
0, Jan-16
0.01, Feb-16
0.05, Mar-16
0.1, Apr-16
0.1, May-16
0.75, Jun-16
0.2, Jul-16
10, Aug-16
10.5, Sep-16
5.5, Nov-16
50, Dec-15
50.5, Nov-15
3.7, Oct-15
0.013, Mar-15
0.01094, Feb-15
1, Jan-15
];
Left Join (T1)
IntervalMatch(value)
LOAD
MINValue,
MAXValue
Resident T1;
I hope this might helps you.
-Nagarjun
Hi Nagarjuna,
I want do this thing in my chart calculation it self
don't want touch any backend code
So please share ur expected output , then we ll try .
assuming will not work ![]()
-Nagarjun