Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi guys,
I have this two inline tables, the aggr expression do not show as expected.
t1:
load * Inline [
id,m1,m2
a,1,10
b,3,4
c,5,5
d,7,9
e,10,10
f,11,12
g,12,13
h,13,13
i,1,3
j,21,1
];
t2:
load * Inline [
seg,seg_id
top2,1
top4,2
top6,3
top8,4
top10,5
];
why the dimension from top4 show 0? 10 is expected
I don't understand the logic which you try to implement, but if you want to repeat the value which you are getting in table then
try below expression
Count(Total aggr(rank(m1),id))
Regards,
Prashant Sangle
I don't understand the logic which you try to implement, but if you want to repeat the value which you are getting in table then
try below expression
Count(Total aggr(rank(m1),id))
Regards,
Prashant Sangle
What are you trying to archive? The two tables are not associated with each other. You will always get 10 as output.
Count(id) will give you the same output in the example you posted.
@kklue Please elaborate on your issue.
I want count(distinct id) according m1 and m2.
just like:
pick(seg_id,
count(distinct
aggr(
if(rank(m1)<=2 and rank(m2)<=2,id)
,id)
)
,
count(distinct
aggr(
if(rank(m1)<=4 and rank(m2)<=4,id)
,id)
)
,
count(distinct
aggr(
if(rank(m1)<=6 and rank(m2)<=6,id)
,id)
)
,
count(distinct
aggr(
if(rank(m1)<=8 and rank(m2)<=8,id)
,id)
)
,
count(distinct
aggr(
if(rank(m1)<=10 and rank(m2)<=10,id)
,id)
)
)
but the expression above do not work as desire, only top2 has value: