Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 vengadeshpalani
		
			vengadeshpalani
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		| ID | IS_AMI | IS_Planned | M_id | 
|---|---|---|---|
| 9 | Y | P | 1 | 
| 9 | N | P | 2 | 
| 9 | Y | P | 3 | 
| 9 | P | 4 | |
| 8 | Y | P | 5 | 
| 9 | N | O | 6 | 
| 9 | N | O | 7 | 
| 9 | Y | O | 8 | 
| 9 | Y | P | 9 | 
| 9 | Y | P | 10 | 
if(ID=9 and IS_AMI ='Y','AMI',
if(ID=9 and IS_AMI ='N','NonAMI',
if(ID=9 and IS_planned='P','Planned'))) as restorecode
Dim: restorecode
Expression : count(M_id)
Result in bar chart :
AMI = 5
NonAMI= 3
Planned = 6 (but it show 1)
how to change "if conditions" for correct result 
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
Table:
LOAD RowNo() as Key,
*;
LOAD * INLINE [
ID, IS_AMI, IS_Planned, M_id
9, Y, P, 1
9, N, P, 2
9, Y, P, 3
9, , P, 4
8, Y, P, 5
9, N, O, 6
9, N, O, 7
9, Y, O, 8
9, Y, P, 9
9, Y, P, 10
];
LinkTable:
LOAD Key,
'AMI' as restorecode
Resident Table
Where ID = 9 and IS_AMI = 'Y';
Concatenate (LinkTable)
LOAD Key,
'NonAMI' as restorecode
Resident Table
Where ID = 9 and IS_AMI = 'N';
Concatenate (LinkTable)
LOAD Key,
'Planned' as restorecode
Resident Table
Where ID = 9 and IS_Planned = 'P';
 
					
				
		
 ahaahaaha
		
			ahaahaaha
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be
if(ID=9 and IS_AMI ='Y','AMI',
if(ID=9 and IS_AMI ='N','NonAMI',
if(ID=9 and IS_planned='P' and IS_AMI ='N','Planned'))) as restorecode
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
Table:
LOAD RowNo() as Key,
*;
LOAD * INLINE [
ID, IS_AMI, IS_Planned, M_id
9, Y, P, 1
9, N, P, 2
9, Y, P, 3
9, , P, 4
8, Y, P, 5
9, N, O, 6
9, N, O, 7
9, Y, O, 8
9, Y, P, 9
9, Y, P, 10
];
LinkTable:
LOAD Key,
'AMI' as restorecode
Resident Table
Where ID = 9 and IS_AMI = 'Y';
Concatenate (LinkTable)
LOAD Key,
'NonAMI' as restorecode
Resident Table
Where ID = 9 and IS_AMI = 'N';
Concatenate (LinkTable)
LOAD Key,
'Planned' as restorecode
Resident Table
Where ID = 9 and IS_Planned = 'P';
