I am averaging a calculated column to show on a visualisation but my results are not what I want.
Exploration wells Discoveries made
0.10 0
0.87 0.32
0.51 0
0.35 0
0.51 0
I am calculating the success rate using a simple expression
[Discoveries made] / [Exploration Wells]
But when I use the Avg aggregate in the visual Spotfire averages the Expression row by row rather than taking the average of the sum (for each year lets say)
So instead of getting 13.5% I get 7.4%
Is there a workaround for this one?
Thanks.
Here's my summary table
I am looking to get the division of the sums for[Discoveries (net)] and [Exploration Wells (net), which for this year would be 2.65/7.71=0.34
Instead I am getting 0.29
My raw data table looks like that:
That's because Spotfire calculates the division on a row by row basis and provides me with the Avg of the calculated column (0.29)
Any ideas?
Thanks
#Mourst- I calculated success rate which is [Discoveries] / [Exploration Wells] with the raw data provided. I am getting 0.34.
Not sure as why you are getting 0.29. Could you post more details as how you are calculating?
Here are the output tables:
Im trying to find matches between column B and C when the value in A is above a certain threshold.
0.99 p269 p269
0.99 p312 p312
0.64 p249 p249
0.64 p247 p247
0.09 p243 p284
I'm trying the Countifs method but it doesnt work.
=COUNTIFS(
A1:A31968,">" & F2,
B1:B31968,C1:C31968
)
The first part works (F2 is my treshold), but the I want to check all rows.
So when my threshold is 0.5 I want 4 as a result. When the threshold is 0.08 I still want 4 because the labels of the fifth row don't match. How do I do this?
One option would be to add a fourth column to spreadsheet in column D containing the following formula:
=IF(B1=C1, 1, 0)
Here is what your spreadsheet looks like now:
A B C D
0.99 p269 p269 1
0.99 p312 p312 1
0.64 p249 p249 1
0.64 p247 p247 1
0.09 p243 p284 0
In other words, if columns B and C agree, there is a 1 otherwise 0. Then, you can use the following COUNTIFS formula:
=COUNTIFS(A1:A5,">0.5",D1:D5,"=1")
Here we check the 0.5 threshhold on column A as you were already doing, but we also check that the B and C values are in agreement.
The other option is to use a pseudo-array formula
=SUMPRODUCT((A1:A5>F2)*(B1:B5=C1:C5))
to combine the two conditions. It doesn't have to be entered as an array formula, but may have performance issues if used on several thousand rows of data.
I have a list of numbers that I need to count, however I need to count the 0.00 but not the 0's. For example:
0
0.00
2.85
6.68
1.35
3.27
5.24
5.42
3.32
7.20
0
0
I would need this to count 9 and exclude the three 0's
I have tried using a COUNTIF formula but it seems to be treating the 0.00 and 0 in the same way which isn't giving me the result I need.
Any help would be appreciated as I'm unable to think of any other way around this.
If you format the list of numbers as Text then the COUNTIF formula will respect the difference between 0 and 0.00. See this example below.
Both B1 and E1 have a similar formula:
=COUNTIF(D1:D12,"<>0")
But the range D1:D12 has been given a format of text and so includes the 0.00 therefore giving the answer you want - 9.
I have a spreadsheet that I am making that looks as follows:
Index Diff Exc Sym Sec Result Criteria Met
3.42 -2.07 0.86 0.92 1.83 1.95
-0.38 -2.93 0.87 0.23 -2.01 0.09
-2.67 -1.84 0.87 -2.49 -3.48 1.32
-0.65 -0.98 0.46 0.98 -2.01 0.00
-0.73 -2.79 -1.07 -2.15 -1.44 -0.10
0.15 2.33 -0.46 -0.66 3.17 0.38 0.38
0.90 -3.68 -0.72 -1.01 -1.36 1.69
0.68 -1.12 -0.36 0.73 -1.34 -0.29
-1.19 -1.70 -0.56 -1.31 1.45 0.49
-0.45 -0.69 -0.56 -1.22 0.00 -0.49
2.94 8.38 2.21 6.25 4.96 1.74
-1.04 7.36 2.59 3.00 2.17 2.97
1.21 1.73 3.05 1.48 3.56 0.77
-1.10 1.86 0.60 1.18 1.07 -0.49
-0.89 -3.19 -1.78 -2.24 -4.26 -0.81
-1.17 -3.44 0.11 -1.22 3.66 0.36
0.52 0.92 -1.02 0.38 1.96 -1.40 -1.40
-0.90 3.01 -0.86 0.62 0.97 -0.50 -0.50
2.78 1.46 0.00 0.47 1.95 0.84
Max Min
Index 2.00 -2.00
Diff 10.00 0.00
Exc 0.00 -10.00
Sym 10.00 -10.00
Sec 20.00 0.00
Under the headings Index, Diff, Exc, Sym, Sec, Result is all data, In the criteria met column i have a formula that checks if the prior headings fall within the Max and Min limits of the smaller table underneath, and if they do it posts the result, if they dont all fall within the Max and Min boundaries it leaves it blank. I did that by using this formula:
=IF(AND(A3<$B$24,A3>$C$24,B3<$B$25,B3>$C$25,C3<$B$26,C3>$C$26,D3<$B$27,D3>$C$27,E3<$B$28,E3>$C$28),F3,"")
copied down the criteria met column. It works perfectly fine for what I want it to achieve but as this spreadsheet grows and I add more columns it seems like it will be incredibly inefficient and prone to alot of human error. Is there a way to achieve the same results but by using a more efficient formula?
a picture for reference as well:
Try this array formula:
=IF(SUM((A3:E3<=TRANSPOSE($B$24:$B$28))*(A3:E3>= TRANSPOSE($C$24:$C$28)))=COLUMNS(A3:E3),F3,"")
Being an Array Formula it must be confirmed with Ctrl-Shift-Enter when exiting Edit mode. When done correctly Excel will automatically put {} around the formula to denote an array formula.
One caveat, the Columns to be compared need to be in the same order as the min/max rows.
Also, as has been stated by nearly everyone if the Min Max were transposed to rows from column it would alleviate needing to use a CSE array formula. The following would work:
=IF(SUMPRODUCT((A5:E5>=$A$3:$E$3)*(A5:E5<=$A$2:$E$2))=COLUMNS(A5:E5),F5,"")
Try something like this:
=IF(PRODUCT(IF(ROW>TRANSPOSE(MIN),1,0),IF(ROW<TRANSPOSE(MAX),1,0))=1,RESULT,"")
In this example, A11:E11 is a row of data with RESULT in F11 and the MAX and MIN criteria are in $B$27:$B$31 and $C$27:$C$31, respectively.
=IF(PRODUCT(IF(A11:E11>TRANSPOSE($C$27:$C$31),1,0),IF(A11:E11<TRANSPOSE($B$27:$B$31),1,0))=1,F11,"")
Enter the expression as an array formula (CTRL-SHIFT-ENTER). Make sure to use a relative reference for each row of data and absolute references for the MAX and MIN criteria. Then copy/paste to evaluate other rows. Modifying this formula to accommodate additional columns of data can be done by extending the ranges.
If you are permitted to transpose the range that holds the MAX and MIN criteria to the same orientation as the data, the TRANSPOSE functions in this solution can be eliminated and the spreadsheet layout will be cleaner.
Hope that helps
How about:
=IF(AND(A3=MEDIAN(A3,B$24,C$24),B3=MEDIAN(B3,B$25,$C$25),C3=MEDIAN(C3,B$26,$C$26),D3=MEDIAN(D3,B$27,$C$27),E3=MEDIAN(E3,B$28,$C$28)),F3,"")
I would also move the criteria table into a separate tab to avoid that you have to adjust the loacation of the min/max values in your formula every time you add new rows to your data table.
Often in Excel, in order to simplify your formulas, you need to make your layout a little more complex. Without writing any vba, my approach would be ...
1) I would transpose your min / max layout and have them align with the columns of data.
2) Insert another sheet to hold intermediate calculations.
Here's Sheet1 ...
and here's Sheet2 ...
In Sheet2, cell B5 contains a typical formula ...
=IF(AND(Sheet1!B5<Sheet1!B$2,Sheet1!B5>Sheet1!B$3),1,0)
In Sheet2, cell G5 (and down) contains ...
=PRODUCT(B5:F5)
In Sheet1, cell H5 (and down) contains ...
=IF(Sheet2!G5=0,"",Sheet2!G5*G5)
It could omit the logic and you could make the sheet settings to not display 0 values.
If you add columns (e.g. insert columns between Sheet1 column F and G):
- add Max and Min values for new columns on Sheet1
- insert the same columns on Sheet2
- drag the formula from column F on sheet2 to the new columns on Sheet2
- verify the Product formula in the "Result" column on Sheet2 contains the new columns on Sheet2.
This method helps identify exactly what caused you to fail to meet your criteria.
I would like to do certain operations between groups of data in the same row. I have data from a device into Excel. This data gives me the time on the position of certain object on a screen. But there are some fragments of data missing due to noise of the instrument among others.
Is there a way to operate and do calculations with the numbers between these data gaps?
For example:
Cell Time Position
---- ------ --------- -------------
1 0.05 s 12.3 mm
2 0.10 s 12 mm
3 0.15 s 13 mm
4 0.20 s 13.33 mm
5 0.28 s 0 mm (data missing)
6 0.30 s 0 mm
7 0.36 s 14.21 mm
So, in the next column I want to have the final position - the initial position (overall object movement). and I want Excel to find the 0 and subtract the cell above from the first one. In the example it would be 13.33-12.30 and I want to do the same for the next set of data starting with 14.21 mm (until it reaches another 0).