Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hello
I have a requirement to add up the measure (for each row) only if they are +ve.
The underlying data for a catalog 1123CB is as shown below
| catalog | Area | A | B | C | Total | 
| 1123CB | Pune | -80 | 32 | 55 | 87 | 
| 1123CB | Mumbai | 170 | -65 | 15 | 185 | 
| 1123CB | Chennai | 24 | 122 | -9 | 146 | 
At Qlikview level, I have to display Catalog and Totals only.
Totals for catalog 1123CB should be 87+185+146 = 418
I am using the following formula in Qlikview to achieve this -
if(sum(A) <0, 0, sum(A))) +(if(sum(B) <0,0, sum(B) )) +(if(sum(C) <0, 0, sum(C)))
But the above gives me total of 264 as it does a Sum of Measures A,B,C and then applies for the formula.
How can I achieve this, please advise ?
 Gysbert_Wassena
		
			Gysbert_Wassenasum(rangesum(rangemax(A,0),rangemax(B,0),rangemax(C,0)))
 Gysbert_Wassena
		
			Gysbert_Wassenasum(rangesum(rangemax(A,0),rangemax(B,0),rangemax(C,0)))
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		By this you are also get correct result
if(sum(A) < 0, 0, sum(A)) +
if(sum(B) < 0, 0, sum(B)) +
if(sum(C) < 0, 0, sum(C))
Note:- Instead you select Sum of rows from the properties but Rangesum is right way
See snap here:-

Hope this helps
 
					
				
		
Plese find attached application.
 
					
				
		
Sum of rows - doesnot make any difference.
Rangesum works !
 
					
				
		
 CELAMBARASAN
		
			CELAMBARASAN
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
=RangeMax(A,0)+RangeMax(B,0)+RangeMax(C,0)
