I have a table with a state column
Area Loc State
ABC 1 X
ABC 2 Y
ABC 3 X
ABC 4 Y
ABC 5 Z
I would like to name put a name instead of the State but the names are no in any table
State Name
X Empty
Y Full
Z Partial
to get the following result
Area Loc State
ABC 1 Empty
ABC 2 Full
ABC 3 Empty
ABC 4 Full
ABC 5 Partial
Related
I want to make the total of values every each member or names in every each their own group at the first match (or after blank space) or highest values positions of each them on column "D" according to column "B" with the result's row of an output like the exactly as an EXPECT OUTPUT as act of what I've just created on column "E". That's the replace a little bit down of just only one row from the column "B" positions or row must be the same as the column "C" and "D". Could we do this anyway ?
My achievements: I feel I've tried this before and got succeed to achieve this but I've forgot how to solve this when that happened. But it's look like kinda this code of formula:
=FILTER(IF(IFERROR(MATCH($B$3:$B;$B:$B;0);0)=ROW($B$3:$B);SUMIF($B$3:$B;$B$3:$B;$D$3:$D);"");$B$3:$B<>"0")
I don't know if I'm right or wrong but please see the table I'd created at the down below this and also see how I expected with that and feel free as well to edit to my doc file of google sheet I attached down below this.
THIS HERE YOU CAN EDIT TO MY SAMPLE G.SHEET TO SOLVE THIS MY QUIZ. THANKS IN ADVANCE!
A
B
C
D
E
1
2
N U M B
I D - M E M B E R
I D - C O D E
V A L U E S
E X P E C T O U T P U T
3
4
4
JYFI7
5
JYFI7
J3573
3
6
6
JYFI7
IYR
1
7
JYFI7
F498S
2
8
9
3
DFJ9F11
10
DFJ9F11
C684J
7
8
11
DFJ9F11
J58
1
12
13
2
H684K
14
H684K
JF585
2
2
15
16
1
FJSR
17
FJSR
4684
7
16
18
FJSR
834
1
19
FJSR
49
2
20
FJSR
9835
6
Here's a possible solution:
=ARRAYFORMULA(LAMBDA(cusum,IF(SCAN(,cusum,
LAMBDA(acc,cur,if(cur="",,acc+1)))=1,cusum,))
(SORT(SCAN(,SORT(D3:D,ROW(D3:D),0),
LAMBDA(acc,cur,if(cur="",,acc+cur))),ROW(D3:D),0)))
You can find it in tab 'z' cell F3.
I have a constant number X. I also have two numbers that add up to it. How can I make it so that if I change one number, the other number automatically changes so that it still adds up to X.
I have tried to take subtract the one number from X and add it to the other number, but instead I got two numbers in the thousands.
Assuming your constant value is 10, you can set this in a cell and make all your other calculations based on it.
For example, you can have cell C2 containing your constant, in this example, 10
Then in C4 you can have the number which you change, and the value of C5 will be equal to the value of the constant minus the value in C4.
You can then finally do your sum wherever you want, adding up the values of C4 and C5.
Here's an example Spreadsheet:
Untitiled spreadsheet ☆
File Edit View Insert Format Data Tools Extensions Help Last edit was 2 minutes ago
↶ ↷ 🖶 ⮷ | 100%⯆ | $ % .0 .00 123⯆ | Default(Ro... ⯆ | 10 ⯆ | B | I | S | A |⯐|☰
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
1
2
Contsant:
10
3
4
Number 1:
3
5
Number 2:
=(C2 - C4)
6
7
Sum:
=(C4 + C5)
8
I have a 2d Mat which has x,y as indexes and data is a z value.
I would like to create a mat with x,z index
and give y values as the data.
Yes, I understand I would have to limit the range and datatype of z.
I can do it element by element. Is there something faster?
sample
array in:
Y | (X,Y) = Z
3 | 3 1 3
2 | 1 3 4
1 | 2 2 1
---------- X
1 2 3
array out: Z |
4 | 0 0 2 (X,Z) = Y
3 | 3 2 3
2 | 1 1 0
1 | 2 3 1
--------------
1 2 3 X
The resulting matrix will actually be very sparse.
The original will be roughly 100x20 (x100,y20).
The result will be probably 100x1000 with the 20 y values
in each x column. So that is pretty sparse!
I don't know if that matters in the selection of available tools.
Using GoogleSheet, I have two tables as input:
First table:
Name
val1
val2
val3
val4
Joe
X
X
X
Jess
X
X
X
Mark
X
X
meaning that Joe has val1 . val3 . val4, Jess has val1 . val2 . val4, Mark has val2 . val4
Second table is like a matrix:
| val1 | val2 | val3 | val4
val1 warn A warn B
val2 errA
val3
val4
identifying some couples of values associated with some text: val1.val3:warn A, val1.val4:warn B, val2.val3:err A
As result, I would like to join these two tables for extracting a table like this:
Name | Result
Joe warn B (val1.val4), warn A (val1.val3)
Jess warn A (val1.val4)
Mark
I need to address it using googlesheet but I fail, I have too many steps of transformation and finally I'm lost.
Currently, I though that using binary or operator could help. I proceed like this:
#1 Transform second table table2 in new dec values from base2 :
| val1 | val2 | val3 | val4
val1
10 9
val2 6
val3
val4
Each bit corresponds to Val[bit position]. ex : val1 => 1000 , val2 => 0100
(Val1, Val4) => BITOR(1000,0001) = 9
#2 same kind of transformation for the first table table1:
Name | val1(8) | val2(4) | val3(2) | val4(1)|
Joe 8 2 1
Jess 8 4 1
Mark 4 1
#3 extract relevant values form table2
=filter(transpose(flatten(table2)),transpose(flatten(table2))<>0)
I obtain : 10 | 9 | 6 (from table2)
#4 I sum rows in table1:
Name
sum
Joe
11
Jess
13
Mark
5
#5 I apply BITAND operator IF(BITAND(term2,term1)=term1,"Warn") between each terms from terms1 11 | 13 |5 and terms2 : 10 | 9 | 6
for Joe:
So as BITAND(11,10)=10 then i got a "Warn" for 1010 => (Val1,Val3)
So as BITAND(11,9)=9 then i got a "Warn" for 1001 => (Val1,Val4)
So as BITAND(11,6) not = 6 then nothing
But I implemented this for a small set of data as example and nothing is dynamic regarding the number of columns and rows... I guess if there a kind of function or query which could replace in a good way my poor code.
try:
=ARRAYFORMULA({A2:A5, REGEXREPLACE(TRIM(FLATTEN(QUERY(TRANSPOSE(
IF(REGEXMATCH(TRIM(FLATTEN(QUERY(TRANSPOSE(
IF(B2:E5="X", B1:E1, )),,9^9))), TRANSPOSE(QUERY(FLATTEN(
IF(B12:E16="",,A12:A16&".*"&B11:E11)),
"where Col1 is not null"))), TRANSPOSE(QUERY(FLATTEN(
IF(B12:E16="",,B12:E16&" ("&A12:A16&"."&B11:E11&"),")),
"where Col1 is not null")), )),,9^9))), ",$", )})
I have the dataset like this
and want out put like this how can I do that
Here is sample dataset
ID COMP_ID CAR_ID ENGINE COLOR CC
1 c1 car3 xyz blue 2500
2 c2 car4 xyz white 1000
3 c1 car6 xyz green 3500
4 c2 car1 xyz black 4500
5 c3 car5 xyz green 4000
6 c1 car2 xyz red 3000
7 c2 car3 xyz gray 1500
8 c3 car4 xyz silver 2000
You can try a tJavaRow something like :
output_row.foo=input_row.row1+"\n"+input_row.row2;
foo must exist in your Output Schema
and row1 and row2 in your Input Schema
Else, you can concatenate them in a TMap in the same way.