Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Everybody, would you please let me know , how to set an expression to use it for different cells.
for Example,
i am going to take the 2 first digits of a column and multiply it to 10.
My Table is
Row, CA,CB,CC
1,1480,2020,2223
2, 1458,2021,2224
....
...
i need a variable like followings:
Let vTwodig=Left (x,2)*10
x= any column CA,CB,CC and ....
I want to define a new column (CD) the expression which i like to use some thing like following:
vTwodig CC
and next column CE:
Vtwodig CD
Best Wishes
the example is not clear, can you please provide a sample of data and the expected behavior
Hi, thanks for your reply
please do check the following sample.
Let x=left(y,2)
"y" is one of my column in a table.
if i writ the formula the same as followings:
Let x=left(,2)
can i use varible x to calculate the 2 left digits of column z. (=Left(z,2))
= x (Z),
the the answer be the same as = left(Z,2),
Best regards
Hamid, maybe a dumb question on my part, but have you considered doing things in the load script instead of via expression and creating that value as its own field in the data load? I too am having trouble grasping what it is you are really trying to accomplish with things, and I know you have now tried twice to clarify things, but it is still not really making much sense.
I think if you shift this to the load script it may be much easier, as you can take that field during the load and load it twice, once as it is, but then you can do the transformation on the next line doing your left function on it, and multiplying if need be etc. This way everything is tied into the rest of the data model. Sorry I do not have anything better, but if you can further clarify the use case etc. and again, you may need to supply a screenshot or something of what you have as far as data and what you are trying to obtain, that will likely help folks visualize things a lot better. Apologies I do not have anything better for you.
Regards,
Brett
Also see apparent duplicate post: https://community.qlik.com/t5/New-to-QlikView/expression/m-p/1650462#M383865
Regards,
Brett