Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
IHi All,
Good Day !
I have data of following structure:
ID | DIMENSION-A | VALUE |
1 | A | 100 |
2 | B | 101 |
3 | A | 102 |
4 | A | 103 |
5 | A | 104 |
6 | A | 105 |
7 | A | 106 |
8 | B | 107 |
9 | B | 108 |
10 | B | 109 |
11 | A | 110 |
12 | A | 111 |
13 | A | 112 |
14 | A | 113 |
15 | A | 114 |
16 | A | 115 |
17 | A | 116 |
18 | A | 117 |
19 | A | 118 |
20 | B | 119 |
21 | B | 120 |
22 | B | 121 |
23 | B | 122 |
24 | B | 123 |
25 | B | 124 |
What I am trying to do is to get VALUE of maximum ID for a particular dimension. I have achieved this functionality at scripting level, but still trying to achieve at front end scripting.
Output I want is:
ID | DIMENSION-A | VALUE |
19 | A | 118 |
25 | B | 124 |
Please help me out to meet this requirement at front end scripting, as user experience needs to be associative.
Attaching Excel file and qvw file:
This?
Use DIMENSION-A as chart dimension and as expressions Max(ID) and FirstSortedValue(VALUE, -ID).
Thanks Sunny, Gysbert. That worked very well. I was trying to do it with set analysis, but did not succeed.
Using set analysis:
If you want to learn how to achieve the same result with set analysis then that's a fine exercise. But the FirstSortedValue function was created exactly for cases like this. Don't make things more complicated then necessary.