Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi
I have an issue with set analysis
I have cloned charts one uses this expression and it is working fine
count(distinct(if(MeterType = 'K' and ExpectedConsumption = 0 ,UnitNo)))
The other chart I have the following set analysis, the syntax seems to be OK but it is just giving me no data to display
Count(distinct{$<MeterType = {"K"} , ExpectedConsumption = {0} > } UnitNo)
What am I doing wrong. the value in ExpectedConsumption comes from SQL where it is a numeric(5,3)
 simospa
		
			simospa
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
changing to
| count({ $< | [MeterType]={'K'}, [ExpectedConsumption]={0.000}>} DISTINCT UnitNo) | 
it works, so the problem is in the ExpectedConsumption format
Hi
S.
 
					
				
		
 alexandros17
		
			alexandros17
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try with
Count({$ <MeterType = {'K'} , ExpectedConsumption = {'0'} > } Distinct UnitNo)
 Gysbert_Wassena
		
			Gysbert_WassenaLooks ok to me at first glance. Can you post a qlikview document that demonstrates the problem?
 
					
				
		
Not working sorry
 
					
				
		
how do I shrink it enough to only show certain records?
 
					
				
		
 giakoum
		
			giakoum
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Make some selections first and then
File --> reduce data
 
					
				
		
Check the data cleansing tab, you will see one with no data and the other with data
 simospa
		
			simospa
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
changing to
| count({ $< | [MeterType]={'K'}, [ExpectedConsumption]={0.000}>} DISTINCT UnitNo) | 
it works, so the problem is in the ExpectedConsumption format
Hi
S.
 
					
				
		
Thanks a million, can you explain why mine was not working and yours, so so I understand exactly what the issue is
 simospa
		
			simospa
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I think that the format in which ExpectedConsumption field iid not recognize as a number by set analysis, but not sure.
If you try to create a chart with sum(ExpectedConumption) as expression you get 0.000, if sum(ExpectedConumption)*1 you get 0.
S.
