Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi guys!
I'm new in this community and I hope to find a solution to my issue.
I have a pivot table like this
| Month | A | B | X | 
|---|---|---|---|
| 1 | 10 | 0 | 0 | 
| 2 | 5 | 2 | 8 | 
| 3 | 20 | 1 | 4 | 
where only Month is a dimension and A and X are expressions.
I want to evaluate X in this mode X(Month) = A(Month - 1) - B(Month).
Can someone explain me how to do that?
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try:
=Above(A)-B
A,B could be labels or expressions.
 
					
				
		
 vipin_mishra479
		
			vipin_mishra479
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi
use above function like tresco has define.
=Above(A)-B
 
					
				
		
Hi tresesco,
I'm sorry but it doesn't work. It returns '-' as result.
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		See attached qvw
 
					
				
		
Your example is perfect but I don't understand why it doesn't work for my chart.
See the attached screenshot (the formula is at the 6th line).
The expression is related to the column "Storno totale".
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sum ( If( Sum ......... structure is wrong. To use one aggregation function into another, you have to use Aggr(), like:
=Aggr( Sum( If(Sum....)), Dim1, Dim2...)
 SunilChauhan
		
			SunilChauhan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		sum(above(A))-Sum(B)
 
					
				
		
Use Above(A)-B
 
					
				
		
Can you send some sample.qvw
