Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi i am trying to count the policy so did like this
count(distinct employee_id).
and dimension is age band
like this
if(ME_AGE>=0 and ME_AGE<=6,'0-6',
if(ME_AGE>=7 and ME_AGE<=18,'7-18',
if(ME_AGE>=19 and ME_AGE<=30,'19-30',
if(ME_AGE>=31 and ME_AGE<=45,'31-45',
if(ME_AGE>=46 and ME_AGE<=60,'46-60',
if(ME_AGE>=60,'60')))))) as age_band
but the result getting is not correct. while checking in db output is little differs in qlikview.
here i attached a sample app please check and let me know what i am doing wrong.
 
					
				
		
 nagarjuna_kotha
		
			nagarjuna_kotha
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		As per your dashboard Data i m getting coorect.
Plz check my screen Shot.
 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		thats y taking distinct. any other way to get right value
 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		any ideas?
 
					
				
		
Hi
Please try to check value for one age_band at DB & QV.
I think all the values displayed in the reports are correct.
Please check value for Age_band 0-6 in DB.
| AGE | COUNT( {<[AGE] ={0,1,2,3,4,5,6}>} DISTINCT EMPLOYEE_ID) | 
|---|---|
| 14433 | |
| 0 | 2139 | 
| 1 | 2903 | 
| 2 | 3058 | 
| 3 | 3051 | 
| 4 | 2980 | 
| 5 | 2944 | 
| 6 | 2688 | 
 
					
				
		
Hey,
try the intervallMatch-Functionality of QlikView, this seems like a perfect problem for IntervallMatch.
You won´t need all thoses IFs there.
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Arul,
If the employees has more than one age band then the employee is counted twice, to overcome this you have to flag the max age records and then create the age band. Like this you can eliminate the duplicate records.
Regards,
Jagan.
 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		can you please tell me how to do it. this my expected below there please check
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 arulsettu
		
			arulsettu
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Macro,
can you please share how to do this with my sample app.
Thanks
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Arul,
Share some sample data and your expected output, so that it would be easier to provide solution.
Regards,
Jagan.
