Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I have one field. Let's name it 'Field_X'.
Field values are either 0 or 1.
I have to make the following calculation:
- for a secain selection i need a sum of all rows that contan Field_X = 1, divided by all rows (Field_X = 0 or 1). 
Then I need to multiply it by 100 to get the percent.
How can I do it? With IF statement? CASE statement?
 
					
				
		
Maybe:
= (
  SUM(Field_x)
/
COUNT(Field_x)
) * 100
Problem is I always get for SUM(Field_x) value 1...
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sum({<Field_X={1}>} Field_X) /Sum(Field_X) *100
Update: You might want to replace latter Sum() with Count()
 
					
				
		
 senpradip007
		
			senpradip007
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have tried with your expression and its working fine.
