Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 17George
		
			17George
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
I'm using dual(value, fabs(value)) as expression in QlikView to display the average value and keep the negative numbers visible but I would like, if possible,  to format the results with 1 decimal place instead of 12. 
(comma as decimal separator)
Is it somehow possible?
Regards
 17George
		
			17George
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@marcus, I created a new table with one dimension and the expression avg(aggr(avg(Value), Dim1)) but a mix of positive/negative numbers, without fabs(), returns always an incorrect result - see  screenshot. 
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The calculation itself is correct. If you want another calculation you may just add the fabs() or other stuff to modify it.
Further it might be that you need different calculations for the different levels, like:
if(dimensionality() = 0, expr1, expr2)
Also thinkable is to wrap the above mentioned aggr() approach with another aggr() to react differently to the levels. But such an approach gets easily complex and by larger data-sets slow.
Therefore I suggest to consider if other views on the information may not also possible and/or even more expedient, for example to use a second column to show the positive/negative information and/or a coloring.
- Marcus
