Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qw_johan
Creator
Creator

Problem with frequency

Hi

I have a problem checking for frequency. I need to know how many times a, b & c have been together.

a->b and b->a should both count as being together for a&b. The result I want is:

a&b = 3

b&c = 1

c&a = 2

MyTable:

INOUTTIMESTAMP
ab2010-06-18 09:34:12
ab2010-01-17 18:25:55
bc2010-01-17 18:48:24
ca2010-01-17 12:09:05
ba2010-01-17 18:20:48
ac2010-01-17 18:26:37

Thanks,

johan

1 Solution

Accepted Solutions
Not applicable

Create a Straight Table with a Calculated Dimension:

=If(IN < OUT

     , IN & ' & ' & OUT

     , OUT & ' & ' & IN)

This will ensure that b & a is the same as a & b

Expression is simply Sum(1).

-John

View solution in original post

3 Replies
Not applicable

Create a Straight Table with a Calculated Dimension:

=If(IN < OUT

     , IN & ' & ' & OUT

     , OUT & ' & ' & IN)

This will ensure that b & a is the same as a & b

Expression is simply Sum(1).

-John

qw_johan
Creator
Creator
Author

Thanks for your quick reply.

That REALLY worked like I wanted it too. Thanks!

a, b, c ... etc represents ip numbers...but that shouldn't make a difference in the expression?

And I have around 100 000 records in my table...using an "if..." expression still ok?

Thanks again John

Not applicable

You're welcome.  It should work with IP addresses just fine. 

Whether the calculation is too much with 100,000 records depends on what else you're doing. 

But if performance suffesr because of the calculated dimension, move it into the load statement so you can use a regular field in your table.