I want to have an output of people with grade greater than 4.75 in the last 3 months. I managed to have this output in the browser:
It would be ok if I had grades greater than 4.75, but I have all values. How do I specify what values I want to have as an output? It's worth mentioning that sredniaOcenaKelnera is a calculated value from Ocena - Usluga Obslugi measure. Calculation looks like this:
UPDATE
I was trying to write the following color expression:
IIF([Measures].[sredniaOcenaKelnera] > 4,75, 32768 /*Green*/, 0 /*Black*/)
But for some reason it doesn't work. Values above 4,75 doesn't appear green
Related
I'm trying to create a calculated field that displays the growth rate in % from one of the numeric columns in my pivot table.
How can I reference a row above the current cell to calculate the growth rate?
=(Current cell - (Current cell - 1 Row)) / (Current cell - 1 Row)
Pivot table
Year
Count
Calculated Field (YoY Growth)
2019
100
2020
300
100%
2021
600
50%
based on instructions:
=(Current cell - (Current cell - 1 Row)) / Current cell
={""; ARRAYFORMULA(IFERROR(B2:B-(B2:B-B1:B999)/B2:B))}
I agree with player0, that seeing your sheet, data, data types and layout would facilitate helping you.
However, I'll venture a solution, sight unseen.
There are actually many ways to address what I think you're asking. This is just one of them.
Suppose that your source numbers are in range A2:A. Place the following formula in some other open column, in the cell parallel to the top number in your source range:
=ArrayFormula(ARRAY_CONSTRAIN({"";FILTER(({A3:A;""}-A2:A)/{A3:A;""},A2:A<>"")},COUNTA(A2:A),1))
I've added in more "parts" than are probably necessary. But I tried to include controls, seeing as I don't know what your data actually looks like.
An alternative is to place the following simpler formula into the cell one below where the top number in your source range is:
=ArrayFormula(IF(A3:A="",,(A3:A - A2:A)/A3:A))
In either case, you'll want to format the column/range where the results will be as percent (Format > Number > Percent).
Obviously, if your source numbers are in a range other than A2:A, you'll need to adjust the ranges in either formula accordingly.
So I'm trying to create a new variable column of ''first differences'' by subtracting values in the SAME column but have no clue how to do so on SPSS. For example, in this picture:
1st value - 0 = 0 (obviously). 2nd value - 1st value =..., 3rd value - 2nd value =..., 4th value - 3rd value =... and so on.
Also, if there is a negative number, does SPSS allow me to log it/regress it? Once I find the first difference, I'm going to LOG it & then regress it. For context, the reason I'm doing this is part of a bigger equation to find out how economic growth and a CHANGE in economic growth (hence the first difference and log) will affect the variable im studying.
Thanks.
To calculate differences between values in consecutive rows use this:
if $casenum>1 diffs = FinalConsumExp - lag(FinalConsumExp).
execute.
If you need help with additional problems please start a separate question for each problem.
HTH.
If 15 is the lowest number and 200 the highest number, what formula do I need to use to define a multiplication pattern that applies the 28 values needed to complete this multiplication table?
I would like to learn how to create this pattern to use, I tried it
through percentages but I was not successful exactly because it had
the minimum and the maximum, if it was only the minimum or only the
maximum, just multiply it by the percentage.
if you want to paste those values in the same column you need to do:
then the formula will be:
=ARRAYFORMULA(INDIRECT("A"&
MAX(IF(A3:A<>"", ROW(A3:A), )))+SORT(ROW(INDIRECT("A1:A"&
MAX(IF(A3:A<>"", ROW(A3:A), ))-2)), 1, 0)*(A1-INDIRECT("A"&
MAX(IF(A3:A<>"", ROW(A3:A), ))))/(
MAX(IF(A3:A<>"", ROW(A3:A), ))-1))
Try this formula in A2 =$A1+($A$30-$A$1)/29 and then drag down to A29
I am trying to use an array to highlight specific rows in my data.
As shown in the picture, i want to extract the maximum positive profit($) and maximum negative profit($) for each respective serial numbers and highlight it in yellow. For example, Tom123's maximum +ve profit = 100 and -ve profit =-74 , thus both values are highlighted in yellow.
I already know how to highlight cells in vba, but i do not know how to get the rows that i need to highlight. Any help is much appreciated.
Add a column to identify if the column C = max profit or max loss
step 1
In D2, write =IF(OR(C2=MAX(IF((A:A=A2)*(C:C>=0),C:C,"")),C2=MIN(IF((A:A=A2)*(C:C<0),C:C,""))),TRUE,"") then press ctrl+shift+enter.
step 2
drag D2 down.
then you will see:
step 3
highlight A:C if D == true with conditional formatting
I have been working on a large data set of lab testing results (previously you all have been helpful but I have a new wrinkle). Each sample has 3 columns in excel(concentration, Qualifier, MDL) and Column A has about 167 chemicals that could possible be screened for. Not all samples were screened for all chemicals, so some of the samples may have blank rows. In column B is a benchmark value that the concentration should not be greater than. I need to do the following 3 things, which i think are somewhat related. 1) Count of samples tested for a chemical, 2) Count of samples with concentrations greater than benchmark with a qualifier <>"U", and 3) Count of samples with concentrations greater than benchmark with a qualifier ="U". See above for how the results should look.
Previously, I had used an aggregate function (Suggested by you guys) to get a max and minimum for samples with a qualifier of u and without - but i can't see a way to do a count using the aggregate function.
Assuming that you meant great than, and not great than or equal to your bench mark, the following three formulas should work for your sample data. It is based on the assumption that a blank concentration means a sample was not tested.
The following counts non blank concentrations:
=SUM(--(F2<>""),--(I2<>""),--(L2<>""))
The following counts concentration greater than the bench mark and no U qualifier:
=SUM(--(AND(F2>B2,G2<>"U")),--(AND(I2>B2,J2<>"U")),--(AND(L2>B2,M2<>"U")))
The following counts concentrations greater than the bench mark and with a U qualifier:
=SUM(--(AND(F2>B2,G2="U")),--(AND(I2>B2,J2="U")),--(AND(L2>B2,M2="U")))
The above formulas are based on the chemical sitting in row 2. copy down as needed.
Note the -- in the formula above simply change the TRUE or FALSE results to an integer 1 or 0 respectively. This can also be achieved using any math operation that does not change the value such as *1 or +0.
OPTION 2
Counting With SUMPRODUCT
Again this will be on the assumption that if the concentration is empty/blank then no sample was tested for that row/chemical. Since the need is to count instead of looking for a max and min, I am opting to use SUMPRODUCT. Like AGGREGATE, it performs array like operations without actually being an array.
The following counts non blank concentrations:
=SUMPRODUCT(($F$1:$N$1="Conc")*($F2:$N2<>""))
The following counts concentration greater than the bench mark and no U qualifier:
=SUMPRODUCT(($F$1:$N$1="Conc")*($F2:$N2>$B2)*($G$1:$O$1="Q")*($G2:$O2<>"U"))
The following counts concentrations greater than the bench mark and with a U qualifier:
=SUMPRODUCT(($F$1:$N$1="Conc")*($F2:$N2>$B2)*($G$1:$O$1="Q")*($G2:$O2="U"))
The above formulas are based on the chemical sitting in row 2. copy down as needed.
Note the shift in range when checking for header Q and the value U