Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a new Data Field from a Expression.

Dears.

I have and expression like this;

If Data 1 = Data 2 and Data 3 = Data4, Data5.

How can i create a new field in the data base with the result of this expression?.

BR

4 Replies
sunny_talwar

From front end of the expression, you cannot create a new field. But may be can do the similar action in the script:

If(Something = SomethingElse, ThenDoThis, OtherDoThis) as NewField

neetha_p
Master
Master

Hi wilmar,

Please try in script:

If(Data1 = Data2 and Data3 = Data4, Expression/Oldfield) as NewField

maxgro
MVP
MVP

If the Data1 2 3 4 fields are in the same table you can make a new field (in the same table) in the script as Sunny and neetha already suggested.

If  the fields are in different tables you should post your .qvw or your db model (ctrl+t)

bunnyv123
Creator II
Creator II

Hi,

it will be based on the data and fields. Can u post sample data or app.

We can use this,

You can use this in edit script back end .

if(Data1 = Data2 ,Data1,Null()) As New_Data1

f(Data2 = Data3 ,Data2,Null()) As New_Data2


You can use this in Fornt end UI.


If(New_Data1=New_Data2,Sum(Expression)) Like this .

I hope this helps you,

Thanks,

bunny