Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
I have a problem with Function "Sum"
I try to calculate "Stock UC a date" with this :
FirstSortedValue(aggr(DISTINCT Sum(Qte_UC_Stock_BDD)+ sum(Qte_PCU_STOJOU),Date_Mvt, Code_Article,Stat_2_Article),-aggr(Date_Mvt,Date_Mvt,Code_Article,Stat_2_Article ))
and
FirstSortedValue(aggr(DISTINCT Sum(Qte_UC_Stock_BDD)+ rangesum(Above(TOTAL (Sum(Qte_PCU_STOJOU)) , 0, RowNo())),Date_Mvt, Code_Article,Stat_2_Article),-aggr(Date_Mvt,Date_Mvt,Code_Article,Stat_2_Article ))
It's Ok for collapse or expand but my results is not good.
Normally subtract every operation of movement of the result obtained previously on "Stock UC a date"
Maybe anyone have an idea where is my problem?
 
					
				
		
 jolivares
		
			jolivares
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I forget attach the sample QVW
 
					
				
		
 jolivares
		
			jolivares
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try to post a small sample with data and show what is your problem better, i can't see what is happening or what you really want.
Let me help you.
 
					
				
		
a demo with my problem
Best regards
 
					
				
		
i join a demo for explain my problem
Best regards
 
					
				
		
anyone can help me  ?
?
 
					
				
		
 jolivares
		
			jolivares
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You need to user dimensionality()
If(Dimensionality()>4,(Sum(StockAnterieur))+ rangesum(Above(TOTAL (Sum(Q_Mvt)) , 0, RowNo())),
FirstSortedValue(aggr(DISTINCT Sum(StockAnterieur)+ sum(Q_Mvt),Date_Mvt, Code_Article,Stat_2_Article),-aggr(Date_Mvt,Date_Mvt,Code_Article,Stat_2_Article )))
 
					
				
		
 jolivares
		
			jolivares
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Ups... I think this is the solution to your question.
 
					
				
		
Hello,
Nor working, i have the same results.
when i expand my board on "date_Mvt" i found 1520 in QTY and is the good results;
but when i collapse to "Code_Article" or "Stat_2_Article" my results is not good i found 1910..
Thanks to the help
 
					
				
		
 jolivares
		
			jolivares
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Ok... Pascal, see the example below. I just simply yours.
This is what you are looking for:
 
					
				
		
 jolivares
		
			jolivares
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I forget attach the sample QVW
