Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Generating a feild in an extract file

I have the following formulae in my extract file which works fine and it creates a field and a number for fare evaders. However I want to use the result to generate another field in the extract file. but it wont let me. Can anyone help

Basically n the example passengers had their tickets checked and their status was then categorised in a 'Validity' field. Those cagegorieed as 'Invalid', ' No Ticket' or 'Non payment' are classed as fare evaders and the formulae below sums them up under the heading 'Evaders'. What I want to do then is take the total passenger check number (field name PAX and divide it by the 'Evaders' number above and multiply by 100 to give me an evasion rate.

(([Validity]= 'Invalid' or [Validity]= 'No Ticket' or [Validity]= 'Non payment'),1,0) as Evaders,

3 Replies
MK_QSL
MVP
MVP

hope you haven't forgot to use If

Not applicable
Author


No Ive used 'IF' it just didnt paste into my text. The formulae below works my problem is then using the result id 'Evaders' in another formulae in the same extract.

Basically all I want to do after the formulae below is divide the 'Evaders' into a field called 'PAX'

ie (Evaders) / (PAX) but it wont let me

=If(([Validity]= 'Invalid' or [Validity]= 'No Ticket' or [Validity]= 'Non payment'),Sum(1/(PAX))*100,0) as Evaders,

MK_QSL
MVP
MVP

Can you please provide some sample data along with your required output?