emorris1000
Registered User.
- Local time
- Today, 11:53
- Joined
- Feb 22, 2011
- Messages
- 125
I'm trying to build a query that will normalize some graphical data along the x-axis. To do this I need all the peaks to be at the same point. I'll just talk in generic terms of FieldX and FieldY for the X and Y variables (resp)
In my mind the steps require me to
1) Determine FieldX at Max(FieldY)
2) Determine difference between FieldX and arbitrary normalization point (probably 100k)
3) Shift FieldX at all points to put Max(FieldY) over 100k (its a log scale so I'll be dividing)
Steps 2 and 3 are easy, but step 1 is giving me grief.
Ok, so I know how to find Max(FieldY), easy enough. Now how do I find FieldX? My first thought is a complex series of subqueries. At some point in the past, where I was smarter than I am today, I created a query that would do numerical integrations. Looking back at the query I can't understand it, but I think the principle will be similar.
But is there an easier way? I'll definitely be putting this into an Excel export which should be relatively easy, but I need to be able to do it in this as well.
Any ideas on how to do this that doesn't involve a large ugly query filled with strange subqueries?
ed: Just to be clear I was able to solve this using three consecutive queries. This is not a good solution because I need to solve this like 10 times, which would give me 30 queries. And I see every query on the left side of my screen as a personal failure.
In my mind the steps require me to
1) Determine FieldX at Max(FieldY)
2) Determine difference between FieldX and arbitrary normalization point (probably 100k)
3) Shift FieldX at all points to put Max(FieldY) over 100k (its a log scale so I'll be dividing)
Steps 2 and 3 are easy, but step 1 is giving me grief.
Ok, so I know how to find Max(FieldY), easy enough. Now how do I find FieldX? My first thought is a complex series of subqueries. At some point in the past, where I was smarter than I am today, I created a query that would do numerical integrations. Looking back at the query I can't understand it, but I think the principle will be similar.
But is there an easier way? I'll definitely be putting this into an Excel export which should be relatively easy, but I need to be able to do it in this as well.
Any ideas on how to do this that doesn't involve a large ugly query filled with strange subqueries?
ed: Just to be clear I was able to solve this using three consecutive queries. This is not a good solution because I need to solve this like 10 times, which would give me 30 queries. And I see every query on the left side of my screen as a personal failure.
Last edited: