Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
kylealpaugh
Contributor
Contributor

how to sum and divide expressions with set analysis

i have two expressions that i would like to add together and then divide by the total number to find a percent of automated orders how would i do this.

=num(sum(count({<Source={'Billing'}, RejectionReason_ABGRU_line={" "}, [Pur. ord. type_BSARK_line]={'EDI','XML'}, [Order Document Type_AUART_line]-={'QT'},[Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line)

+

Count ({<Source={'Billing'}, RejectionReason_ABGRU_line={" "}, [Order Document Type_AUART_line]={ZWEB}, [Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line))

/

count({<Source={'Billing'}, RejectionReason_ABGRU_line={" "}, [Pur. ord. type_BSARK_line]=, [Order Document Type_AUART_line]-={'QT'}, [Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line),'##.##%')


this is my expression how can i fix it to work

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Try this?

=Num(
Rangesum(count({<Source={'Billing'}, RejectionReason_ABGRU_line={' '}, [Pur. ord. type_BSARK_line]={'EDI','XML'}, [Order Document Type_AUART_line]-={'QT'},[Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line)
,
count({<Source={'Billing'}, RejectionReason_ABGRU_line={' '},
[Order Document Type_AUART_line]={ZWEB}, [Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line))
/
count({<Source={'Billing'}, RejectionReason_ABGRU_line={' '},
[Pur. ord. type_BSARK_line]=, [Order Document Type_AUART_line]-={'QT'}, [Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line)
,'##.##%') 

View solution in original post

2 Replies
vishsaggi
Champion III
Champion III

Try this?

=Num(
Rangesum(count({<Source={'Billing'}, RejectionReason_ABGRU_line={' '}, [Pur. ord. type_BSARK_line]={'EDI','XML'}, [Order Document Type_AUART_line]-={'QT'},[Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line)
,
count({<Source={'Billing'}, RejectionReason_ABGRU_line={' '},
[Order Document Type_AUART_line]={ZWEB}, [Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line))
/
count({<Source={'Billing'}, RejectionReason_ABGRU_line={' '},
[Pur. ord. type_BSARK_line]=, [Order Document Type_AUART_line]-={'QT'}, [Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line)
,'##.##%') 

View solution in original post

sasiparupudi1
Master III
Master III

May be try

Num(

Count(

{

<Source={'Billing'}, RejectionReason_ABGRU_line={" "}, [Pur. ord. type_BSARK_line]={'EDI','XML'}, [Order Document Type_AUART_line]-={'QT'},[Company Code_BUKRS]={'1100','1500'}>

+

<Source={'Billing'}, RejectionReason_ABGRU_line={" "}, [Order Document Type_AUART_line]={'ZWEB'}, [Company Code_BUKRS]={'1100','1500'}>

}

distinct %OrderDocumentItem_Key_line

)

/

count({<Source={'Billing'}, RejectionReason_ABGRU_line={" "}, [Pur. ord. type_BSARK_line]=, [Order Document Type_AUART_line]-={'QT'}, [Company Code_BUKRS]={'1100','1500'}>} distinct %OrderDocumentItem_Key_line)

,'##.##%')