Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi everyone!
I have this table:
| Order no | S_Q | A_Q | 
| A | 100 | 125 | 
| B | 200 | 199 | 
| C | 300 | 280 | 
| D | 400 | 0 | 
| E | 0 | 500 | 
| F | 600 | 400 | 
| G | 550 | 550 | 
I would like to show the difference between S_Q and A_Q that greater than 5% or less than -5%, the answer should be like these:
| Order no | S_Q | A_Q | Diff | %diff | 
| A | 100 | 125 | 25 | 20% | 
| C | 300 | 280 | -20 | -7% | 
| E | 0 | 500 | 500 | 100% | 
| F | 600 | 400 | -200 | -50% | 
what is the expression?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
Dimension
Order no
Expressions
If(fabs((A_Q - S_Q)/A_Q) > 0.05, (A_Q - S_Q))
If(fabs((A_Q - S_Q)/A_Q) > 0.05, (A_Q - S_Q)/A_Q)
Basically, you need to restrict your other expressions to not show value when the percentage is less than 5% or greater than -5%...
 
					
				
		
Is it right to add calculation dimension like this? (A_Q - S_Q)
why in siome cases I get this error:
| // Error in calculated dimension | 
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can do that too...
Dimension
=Aggr(If(fabs((A_Q - S_Q)/A_Q) > 0.05, [Order no]), [Order no])
Expression
(A_Q - S_Q)
(A_Q - S_Q)/A_Q
