Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

DIV

I have the following

IF(turned = 'Yes',1,0) as [Countofturned],

    
IF(Initial = 'Denied',1,0)as [CountofDenied],

    
Div([Countofturned],[CountofDenied]) as [Percent]

Getting an error Countofturned does not exist. How can I write this in the script?

11 Replies
Anonymous
Not applicable
Author

Fields are all in one single table and the primary key is ID.

swuehl
MVP
MVP

Something like

LOAD

    YourGroupByField,

     Count(DISTINCT  If( turned = '[Yes]', ID )) / Count( If(Initial = '[Denied]', AuthID)) as Quotient

RESIDENT YourTable

GROUP BY YourGroupByField;

Replace YourGroupByField with the field(s) that you want to use to group the Quotient (like your dimensions on front end).

If this is not working, please post a sample QVW. It's hard to help you with only limited understanding of your setting and data.