Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hey Guys,
I just created an expression based on an IF statement but I can't get the SUM total on the first row even though the expression total is selected on the Expression tab. Please any idea on how to figure this out will be truly appreciated.
Thanks,
Simon.
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		And your expression looks like ...?
If your if() statement is embedded in the aggregation, I think it should work.
If your if() statement is testing dimension values, outside the aggregation, you need to use advanced aggregation to get the total:
=Sum( Aggr( If(Dim ='A', Sum(Value1), Sum(Value2) ), Dim))
 
					
				
		
 alexandros17
		
			alexandros17
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		are you using a pivot table ?
If yes, try to transform to a straight table and verify the result, if this is the case (otherways let me know) you have to use dimensionality finction
 
					
				
		
Hi ,
I am using a straight table but its not given me the total on the first row.
 
					
				
		
Hi ,
my expression is as follows:
if(column(3) <0,0.25 * column(3)).
It give me the sum total on the individual fields but not the grand total on the first row. If I add sum to the expression, it show the sum total on the first row as 0.
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		And the expression in column(3) looks like...
 
					
				
		
Column(1) : Sum(Distinct )Column(2) : Sum( + + )
So column(3) : Column(1) - Column(2).
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry, your posted expressions don't make sense to me.
Could you upload a small sample QVW that demonstrates your issue?
 
					
				
		
Hi, Sweuhl,
I have figure it out. Thanks for your contribution all thesame.
 gsbeaton
		
			gsbeaton
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Simon,
Try putting the the function column(3) on its own into your expression, is it reproducing the desired result? There is no reason why your expression shouldn't work, even with an IF. Total's should also work.
You are testing for values less than 0 (ie, negative values) so your expression is only going to fire if the value in column 3 is negative. Is this what you meant? Sorry if this is vague, there's not a lot to go on!
If you can post your QVW I'd be happy to take a look.
George
