Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
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?

Labels (1)
11 Replies
Anonymous
Not applicable
Author

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

swuehl
Champion III
Champion III

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.