Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 rcorcoran
		
			rcorcoran
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
I want to count the order_id where the comment field is empty. (in a straight table)
if anyone could help it would be great
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try like :
=Count ( Distinct If( Len(Trim(comment))=0, order_id))
 
					
				
		
 israrkhan
		
			israrkhan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Try like this..
Count({<comment={' '}>} order_id)
 rbecher
		
			rbecher
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This should work:
=Count(DISTINCT order_id) - Count({<comment={"*"}>} DISTINCT order_id)
- Ralf
 rcorcoran
		
			rcorcoran
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks for your replies. I still can't get it to work. I probably didnt explain properly:
the expression I have is:
count({$<[KPI within 1] = {'1'}>} distinct order) I now need to have the same expression but only count the comment fileds that are blank or have ' - ' in them?
Thanks
 ljackson
		
			ljackson
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you tried the ISNULL function?
 
					
				
		
 Yousef_Amarneh
		
			Yousef_Amarneh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If(isnull(Comment),count(order_id),0)
 
					
				
		
 VishalWaghole
		
			VishalWaghole
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi rhona,
Try this on script level
Load Order_id,
if(isNull(Order_id),'NULL','NOT_NULL') as ORDER_ID_NULL_FLAG
from table_name;
then count NULL values on expression level,
=count(<ORDER_ID_NULL_FLAG = {<'NULL'>}> Order_Id)
This will return you the count of only Null Order Id
Thanks and Regards,
Vishal Waghole
 MayilVahanan
		
			MayilVahanan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI
Try like this
count({$<[KPI within 1] = {'1'}, comment -={'*'}>} distinct order)
 
					
				
		
Try load with:
LOAD *,if(comment ='','-',comment) as comment1
from TABLE_NAME;
And then use following expression in chart:
count({$<[KPI within 1] = {'1'}, comment1 = {'-'}>} distinct order)
Hope it helps...
