I am a beginner in spotfire. I need to make a calculated column from the data shown below
The first column is a list of schools, the second column is the list of ranks students got in an exam and the third is the Score/Mark the particular student got. I need to create a calculated column such that corresponding to every 4 th rank rank of each school I need to see the difference in Score obtained by Rank1 and Rank4 in the same school. I am attaching the desired result below
I think the slution is to use some variant of OVER , but I am not able to figure it out
This will get you what you are looking for
If(([Rank]=1) or ([Rank]=4),[Mark] - Max([Mark]) OVER (Intersect([School],Previous([Rank]))))
#user7266220 - The below expression should get you the desired result.
(If([Rank]=4,[Mark])) - Sum([Mark]) over (Intersect(firstnode([Rank]),[School]))
This works irrespective of rank order.
Related
I have a column called Paid which consists of currency figures which is in column A.
I also have a column called ID to uniquely define each of the rows which is in column B.
I am trying to make a top ten list of the highest results from this column.
For the first result, I use a simple MAX function.
For the following, I use
=MAXIFS(Combined!$A$1:$A$2916,$A$1:$A$2916,"<"&$C1)
where C1 is the first result in the top 10 list.
THE ISSUE: Currently, if two results are equal in Paid, one will get skipped and not be on the list.
I've tried using something in the nature of
=MAXIFS($A$1:$A$2916,$B$2:$B$2916,"<>"&$D1)
where D1 is the ID of the 1st in the top 10 list.
My issue here is that I want to use a condition to say that none of the ID's in the B column appear in the above entries in the D column(IDs of the top 10) and I don't know how to do this without brute forcing and writing each cell into each condition.
Is there a smoother way to write a "not in" check in a maxif function?
Thanks
For reference, an example of what I want would look like:
Example Data
Maybe try:
Formula in C2:
=INDEX(SORT(A2:B11,1,-1),SEQUENCE(10),{1,2})
Where 10 is your top N figure.
Note: The above works fine in retrieving only 10 figures, yet if you insist you want top have ID '5' above '3' in rank 2, and ID '9' above '1' for rank 8, then use:
=INDEX(SORTBY(A2:B11,A2:A11,-1;B2:B11,-1),SEQUENCE(10),{1,2})
I could see this being relevant if you have two identical payments "battle" for e.g. 1st or 10th place with one of multiple id's comming short.
I read through some of the other tie breaker-related threads but didn't seem to find this exact solution...
The old tie-breaker question again.
In column A are the point values from a psychology test, with the related need listed in column B.
I found a formula to list the values in order from highest to lowest in column C.
I am looking for way to then list the needs according to the score from highest to lowest (Column D), because then I have a formula that I am running based on the top 2 results. There is a tie between 2 of them but I need to list the results for each out separately.
I have tried a few different formulas but none have quite worked.
Screenshot
For the first:
=INDEX($B:$B,AGGREGATE(15,6,ROW($A$2:$A$7)/($A$2:$A$7 = LARGE($A:$A,1)),1))
For the second:
=INDEX($B:$B,AGGREGATE(15,6,ROW($A$2:$A$7)/($A$2:$A$7 = LARGE($A:$A,2)),COUNTIF($C$2:$C3,LARGE($A:$A,2))))
To get the list in Column D:
=INDEX($B:$B,AGGREGATE(15,6,ROW($B$2:$B$7)/($A$2:$A$7=C2),COUNTIF($C$2:C2,C2)))
I have some products and each products are made of one or more parts. I attached a sample.
For example, product A is made of one part "a11" and client ordered 10, Product B is made of 2 part "a12" and client ordered 20...... product E is made of 2 part "a15" and 3 part "a16"and client ordered 50.
I have a second table to summarize how many parts in total do I need (E1:F7). I want to do formula =sumif($B$2:$B$7,$E2,sumproduct(C2:$C$7,D2:D7)) to see the total of each part I need but it doesn't work, anyone knows any formula that can help me with this problem?
I'm trying to rank values and have managed to work out how to sort ties. My data looks at the total number of entries, ranks based on that and if there is a tie it looks to the next column of values to sort them out. However, I have two classes (East and West I've called them) of data within my dataset and want to rank them both separately (but stick to the rules above). So, if I had seven entries, 3 of them West and 4 of the East, I want West to have ranking 1,2,3 based on all the values that lie in that subset and East would have ranking 1,2,3,4. Can you explain what your formula is doing so I can understand how to apply your answer better in the future.
Effectively I'm asking what formula needs to go in achieve my result.
Cheers
Paul
There are a few related ways to do this, most involving SUMPRODUCT. If you don't like the solution below and would like to research other ways/explanations, try searching for "rankif".
The function looks up the Class and Value columns and, for every value in those columns, returns a TRUE or 1 if the current Class is a match AND if its Value is larger than the current Value, False or 0 if otherwise. The SUM adds up all these 1s, and the 1+ is for decoration. Remember to enter as an array formula using Ctrl+Shift+Enter before dragging down.
I used the array formula and SUM above to explain, but the following also works and might even be faster since it's not an array formula. It's the same idea, except we hijack SUMPRODUCT's ability to spit out a single value from an array.
=1+SUMPRODUCT(($A$2:$A$8=A2)*($B$2:$B$8>B2))
EDIT
To extend the rank-if, you could add more subsets to rank by multiplying more conditions:
You can also easily add tiebreakers by adding another SUMPRODUCT to treat the ties as an additional subset:
The first SUMPRODUCT is the 'base rank', while the second SUMPRODUCT is tiebreaker #1.
I'm doing like a bit of a competition for my students in which they have a weekly test they have to complete and submit. The grade is stored in an excel column next to their names.
Following instructions i found, i was able to create a full working general TOP3 with the Average of the tests' grade and when i get to the TOP5 for the grades of the last submitted test, i get a three-way tie.
I use the LARGE function to find the top grades and the combination of the INDEX and MATCH functions to find and display the name associated to that mark.
(Something like this =INDEX($A$1:$A$29;MATCH(M12;$F$1:$F$29;0))
The problem is that the function compares the grade on it's left to find that value in the range of grades and then returns the corresponding name associated to that row; so, it returns the same name for the three grades.
I tried using an IF function to exclude the first-result-cell from the array in which the formula is looking so that when it finds a match it will be different from the previous one, but i have not manage to work it out...
You need to use a pivot table and filter the results to the top 3. A pivot table will display the ties.
Here is a link that #Jeeped gave which basically solves the problem!
Thank you all for commenting!
Multiple Ranked Returns from INDEX(…) with Duplicate Values:
http://tinyurl.com/naavhgf