Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 penpayom
		
			penpayom
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Help me please
Why is the answer in the regular table not equal to the Pivot table?
This my code in Expression Pivot table
=aggr(sum(DISTINCT(Fabric_QTY)*(ITEM_CONTAIN)/100),YARN_ITEM,Yarn_week)
Excample Yarn item = CVC20/1R week 18
 
					
				
		
 Or
		
			Or
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I wasn't able to understand what you're trying to do here.
You are comparing two different formulas. Why should they give the same result?
Additionally, you are using Sum(Distinct ...) which is almost always a bad idea since the same value might repeat multiple times.
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		There are various things noticeable. At first the distinct within the sum() like orsh_ hinted. Further the dimensions within the second table aren't the same like in the aggr and then it missed an outer aggregation.
- Marcus
 penpayom
		
			penpayom
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I tried the same formula with the table below. But the value does not match. So try to group with aggr. What formula should I use to calculate?
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Shouldn't you just use:
=sum(Fabric_QTY *(ITEM_CONTAIN/100))
for both tables?
-Rob
 balabhaskarqlik
		
			balabhaskarqlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this:
=Aggr(Sum(Fabric_QTY * (ITEM_CONTAIN/100)),YARN_ITEM)
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Bala, why Aggr()?
-Rob
