Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis Greater than and less than

I am strugling with set-analysis of greater than and less than with numerical Feilds. Below is the expression expression for exmaple: Actually i have to compare kd_time with von and bis. Here kd_time, von, bis fields are numeric

date, kd_date fields are in date format

=if(Count({<[LP.date]={'=LP.kd_date'}, [LP.kd_time]={'>=$[LP.von]<=$[LP.bis]'},LP.kd_date={'*'}-{''}>}VK.ln), 'T','X')

i am able to acheive this with IF condition but i want to do this with set analysis

count ( if([LP.date]=(LP.kd_date) and LP.kd_time >= LP.von and LP.kd_time <= LP.bis and  LP.kd_date<>0,VK.ln))

Thanks in advance!

Regards,

1 Solution

Accepted Solutions
sunny_talwar

My bad, can you check without the dollar sign. I think I missed it by mistake

=Count({<[LP.date] = P(LP.kd_date), [LP.kd_time] = {"=[LP.kd_time] >= $[LP.von] and [LP.kd_time]<= $[LP.bis]"}, LP.kd_date={'*'}-{''}>} VK.ln)

So try this:

=Count({<[LP.date] = P(LP.kd_date), [LP.kd_time] = {"=[LP.kd_time] >= [LP.von] and [LP.kd_time] <= [LP.bis]"}, LP.kd_date={'*'}-{''}>} VK.ln)

View solution in original post

8 Replies
sunny_talwar

May be this:

=Count({<[LP.date] = P(LP.kd_date), [LP.kd_time] = {"=[LP.kd_time] >= $[LP.von] and [LP.kd_time] <=$[LP.bis]"}, LP.kd_date={'*'}-{''}>} VK.ln)

hemanthaanichet
Creator III
Creator III

Hi


Below is the expression i think

Count({<[LP.date] = {=$[LP.kd_date]}, [LP.kd_time] = {"=[LP.kd_time] >= $[LP.von] and [LP.kd_time]<=$[LP.bis]"}, LP.kd_date={'*'}-{''}>} VK.ln)

Regads

Hemanth

Not applicable
Author

Thanks Sunny,

The whole syntax all together is not working

but below mentioned part is working correctly:

=if(Count({<[LP.date] = P(LP.kd_date), LP.kd_date={'*'}-{''}>} VK.ln),'t','x')

but below mentioned, when we are comparing greater than less than this is not working:

=if(count({<[LP.kd_time] = {"=[LP.kd_time] >= $[LP.von] and [LP.kd_time] <=$[LP.bis]"}>}Vk.ln),'t','x')

thanks for your quick answer!

sunny_talwar

My bad, can you check without the dollar sign. I think I missed it by mistake

=Count({<[LP.date] = P(LP.kd_date), [LP.kd_time] = {"=[LP.kd_time] >= $[LP.von] and [LP.kd_time]<= $[LP.bis]"}, LP.kd_date={'*'}-{''}>} VK.ln)

So try this:

=Count({<[LP.date] = P(LP.kd_date), [LP.kd_time] = {"=[LP.kd_time] >= [LP.von] and [LP.kd_time] <= [LP.bis]"}, LP.kd_date={'*'}-{''}>} VK.ln)

Not applicable
Author

Many Thanks Sunny,

its work 99% but just 4-5 records are not correct.:) so right now i don't know whats the problem. may be you know?

Regards,

Sneh

sunny_talwar

Is this coming from a single table? Do you have a unique identifier in that table?

Not applicable
Author

Hello Sunny,

no, it's not coming from single table. and i have no unique identifier.

have a nice day from Germany!

Thanks,

Sneh

sunny_talwar

In that case you might be better off using if statement rather then using the set analysis.