Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
It is very urgent ,the issue is i want to count no of positive values greater that 0 in a column.How can i write an expression as that column is doing a division of two previos columns.
Thanks in advance
Ferha Jafri
Hi Ferha,
Make Flag for negative and positive values on script level like
if(Column_Value > 0,'POSITIVE','NEGATIVE') as FLAG
then use this flag for in your count expression like
Count({<FLAG = {'POSITIVE'}>}Column_Value)
Thanks and Regards,
Vishal Waghole
if(column_Result > 0 , 1 ,0) and sum it
Hi,
To count the positive values then use the below expression:
Count({<Coulmn1 = {'>0'}>} Coulmn1)
I am not sure, what do you mean by "How can i write an expression as that column is doing a division of two previos columns."?
no it is not like this ,i want to count no of rows for which the expression is positive as i have to divide some expression with that count.
Hi Ferha,
Can you post sample script or attached qvw, so that we can check what exactly you are looking for.
Regards,
NR
this expression is not working.
The situation is that i want to calculate avg but if i use avg function it is dividing the result with total no of rows although i want to divide that expression with the count of positive values.
Can you post a sample app?
Hi,
Try to divide your expression with "Count({<Coulmn1 = {'>0'}>} Coulmn1)". Is it make sense?
Try this
=if(Left(Result,1)='-',Result,0)
See this sample for reference