Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following table:
ID | XK | XTD | YK | YTD | ZK | ZTD |
100 | 0,12 | 18/09/2013 17:28 | 0,25 | 10/09/2013 13:25 | 0,08 | 28/09/2013 22:10 |
100 | 0,23 | 18/10/2013 17:35 | 1,38 | 27/10/2013 7:53 | 0,17 | 12/10/2013 1:38 |
100 | 0,22 | 19/11/2013 17:18 | 0,20 | 05/11/2013 7:39 | 0,10 | 17/11/2013 18:17 |
Where:
So XK is related to XTD, YK is related to YTD and ZK is related to ZTD.
What I need is to get the max value between XK, YK and ZK for each row and also return the date for the corresponding Power.
In this example I should get:
ID | MAX | DATE |
100 | 0,25 | 10/09/2013 13:25 |
100 | 1,38 | 27/10/2013 7:53 |
100 | 0,22 | 19/11/2013 17:18 |
Do you know how could I do this?
I'd prefer doing this in the script.
Thank you!
Load RowNo() as NO, * Inline
[
ID, XK, XTD, YK, YTD, ZK, ZTD
100, 0.12, 18/09/2013 17:28, 0.25, 10/09/2013 13:25, 0.08, 28/09/2013 22:10
100, 0.23, 18/10/2013 17:35, 1.38, 27/10/2013 7:53, 0.17, 12/10/2013 1:38
100, 0.22, 19/11/2013 17:18, 0.20, 05/11/2013 7:39, 0.10, 17/11/2013 18:17
];
Create a Straight Table
Dimension
NO
ID
Expressions
1)
RangeMax(XK,YK,ZK)
2)
IF(RangeMax(XK,YK,ZK) = XK, XTD,
IF(RangeMax(XK,YK,ZK) = YK, YTD, ZTD))
Go to presentation tab and select NO and Hide this column
Load RowNo() as NO, * Inline
[
ID, XK, XTD, YK, YTD, ZK, ZTD
100, 0.12, 18/09/2013 17:28, 0.25, 10/09/2013 13:25, 0.08, 28/09/2013 22:10
100, 0.23, 18/10/2013 17:35, 1.38, 27/10/2013 7:53, 0.17, 12/10/2013 1:38
100, 0.22, 19/11/2013 17:18, 0.20, 05/11/2013 7:39, 0.10, 17/11/2013 18:17
];
Create a Straight Table
Dimension
NO
ID
Expressions
1)
RangeMax(XK,YK,ZK)
2)
IF(RangeMax(XK,YK,ZK) = XK, XTD,
IF(RangeMax(XK,YK,ZK) = YK, YTD, ZTD))
Go to presentation tab and select NO and Hide this column
Great! Thank you very much!