Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a field in the script

We are trying to create a field name "PREMIUM" in our script using the following formula:

if (AmountType = 'P' , SignedAmount) as PREMIUM

When reloading the script there are no errors however when trying to load the field PREMIUM in a table or chart this field is not showing.

Any ideas?

Thanks.

5 Replies
tresesco
MVP
MVP

It looks fine, please check the data.

Vegar
MVP
MVP

Check if your logical statement is correct by adding two more columns.


LOAD

[whaterverfields your are using],

if (AmountType = 'P' , SignedAmount) as PREMIUM,

if (AmountType = 'P' , SignedAmount, -1 ) as PREMIUM_TEST,

AmountType = 'P' as _AmountIsP

Resident

[Your source]

awqvuserneo
Creator
Creator

Hi Marcon,

After you load the script, try to see whether the data is properly populated via Table Viewer (CTRL+T) .

If the field and the data is okay, then what's your expression look like?

Try: Sum(PREMIUM)

Best,

Anton

Not applicable
Author

Thank you all for you responses.  It's now working.

Vegar
MVP
MVP

Sounds great.

A tip: you should mark the question  as answered. So that future problem seekers will know it is solved and future problem solvers don't need to open it for trying to help.