Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want something like below in column C. What would be the expression to use for this? Basically, Column C is column A/ parent value in column B
A | B | C | |
X | 10 | 20 | 0.5 |
Y | 3 | 0.15 | |
Z | 7 | 0.35 | |
D | 20 | 100 | 0.2 |
E | 10 | 0.1 |
Hi @younlim91
You can use IsNull() and Peek() to achieve this. Attached script.
test:
LOAD
trim(replace(F1,chr(160),'')) as F1,
A,
"B"
FROM [lib://AttachedFiles/test data.xlsx]
(ooxml, embedded labels, table is Sheet1);
Final:
LOAD *,
A/B1 as C;
Load *,
IF(IsNull(B),Peek(B1),B) AS B1
Resident test;
DROP Table test;
Hi @younlim91
You can use IsNull() and Peek() to achieve this. Attached script.
test:
LOAD
trim(replace(F1,chr(160),'')) as F1,
A,
"B"
FROM [lib://AttachedFiles/test data.xlsx]
(ooxml, embedded labels, table is Sheet1);
Final:
LOAD *,
A/B1 as C;
Load *,
IF(IsNull(B),Peek(B1),B) AS B1
Resident test;
DROP Table test;
If the issue is solved please mark the answer with Accept as Solution