Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I made some vizualisation description to the subject area. Hope this help me to explain )
There is a person who moves between different departments: Dep 1, Dep 2, Dep 3 etc
We don't know his coordinates (x,y), all than we know about him are the Distances between him and certain points A, B, C,D etc (for example every half minute fixations in meters)
The table looks like this
Person_id | time | Point | Distance |
---|---|---|---|
1 | 1:00:00 | A | 4 |
1 | 1:00:00 | B | 3 |
1 | 1:00:00 | E | 2 |
1 | 2:00:00 | B | 2 |
We actually don't know in which Department his was at certain time. But it is considered that person visited department 1 if the distance between him and A point is greater than 1 but less than 5, and the distance to B point is greater than 2 but less 7 and the distance to E point is greater than 1 but less than 6.
!
The department's paramentrs table looks like this:
Department | Point | Distance_from | Distance_to |
---|---|---|---|
Dep 1 | A | 1 | 5 |
Dep 1 | B | 2 | 7 |
Dep 1 | E | 1 | 6 |
Dep 2 | B | 1 | 5 |
Dep 2 | C | 4 | 9 |
Dep 2 | G | 1 | 6 |
Knowing the person position relative to 3 points we can consider which department he visited at certain time.
The result report shoul look like this:
Person_id | time | Department |
---|---|---|
1 | 1:00:00 | Dep 1 |
1 | 2:00:00 | Dep 2 |
I'm trying to solve this task by if statement in expression and also by intervalmatch function, but it seems that i am doing something wrong.
Let me know if anyone has idea or decision of this.
Thank you in advance
Ruslan
Hi Ruslan,
this isn't as simple as a straightforward intervalmatch, although that may be useful when you have your data manipulated.
First off I think you'll need to work out some coordinates for where your people are. For this, you may need some additional data. Currently, you have data such as
Person, Point and Distance.
You'll also need x,y coordinates of your Points in order to calculate the person's coordinates using some basic trigonometry.
Also, do you have the coordinates for the walls of your departments?
Marcus
Hi Marcus !
Thanks for reply
Yes, I have department's corners coordinates, also point coordinates.
Points dont lie on the rectangles (departments) perimeters.
I thought about trilateration approach to determine coordinates, but it seems hardcore way using qlikview (
Hi Ruslan,
given coordinates this should be reasonably straightforward.
However, if you want assistance you're going to have to share them!
Marcus
hi Marcus !
I attached two tables: point coordinates and departments coordinates.
Their structure can be modified to any convenient form for analysis simplification.
How it can help?
Ruslan
Can any one share ideas of realising such logic?