Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

COUNT & IF

Hi guys

I have the following formula that gives either the word GOOD or null.

What must I do in order to count where the below mentioned formula's result is GOOD?

if(((count(if(if((GRQuantity-POQuantity)>=0,GRDocDate-PODocDate,"")<=(PODueDate-PODocDate),'RECEIVED ON TIME',""))) / (count(distinct(ItemCode))))>=0.2,'GOOD')

Thank you

1 Solution

Accepted Solutions
renjithpl
Specialist
Specialist

Hi,

If i understood your question,

Just Try

Sum(your code) just put zero instead of null and put one instead of 'Good')

Sum( if(((count(if(if((GRQuantity-POQuantity)>=0,GRDocDate-PODocDate, "")<=(PODueDate-PODocDate),'RECEIVED ON TIME',""))) / (count(distinct(ItemCode))))>=0.2, 1)

Regards

View solution in original post

5 Replies
john_duffy
Partner - Creator III
Partner - Creator III

Hello.

Change the expressions Total Mode to Text Count of Rows.

John.

Not applicable
Author

Hi

I am not sure what you mean. But all I know is that I need to change my formula in order to count the number of rows that gives the word 'GOOD'.

I can not get your solution to work, thanks anyway.

Thanks

john_duffy
Partner - Creator III
Partner - Creator III

Hello.

I have attached an application showing how the Text Count total mode will sum all rows with the value 'GOOD'. To change the total mode go to the Expressions tab in the chart properties and select Text count from the drop down list in the Total Mode section.

I'm assuming your expression is working fine and you just want to show the total number of rows with the value 'GOOD' on the chart.

John.

Not applicable
Author

The total displays fine, but I need to use the formula in another formula.

Thus I need to know what to change in the formula.

Thank you

renjithpl
Specialist
Specialist

Hi,

If i understood your question,

Just Try

Sum(your code) just put zero instead of null and put one instead of 'Good')

Sum( if(((count(if(if((GRQuantity-POQuantity)>=0,GRDocDate-PODocDate, "")<=(PODueDate-PODocDate),'RECEIVED ON TIME',""))) / (count(distinct(ItemCode))))>=0.2, 1)

Regards