Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 fasibaig
		
			fasibaig
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Guru's
Is there any possibility to avoid the IF statement in the below expression as the performance is too slow Any Suggestions.
=IF (KPI_Name = 'Net Profit',
(Sum({ <[TIME_PERIOD]={'PTD'},[HEADER_TYPE]={1},[REP_HEADER_ID]={'PLT12'}>} AGGR_ACT_PTD*-1)/1000),
IF (KPI_Name = 'Revenue',
(Sum({ <[TIME_PERIOD]={'PTD'},[HEADER_TYPE]={1},[REP_HEADER_ID]={'PLT1'}>} AGGR_ACT_PTD*-1)/1000),
IF (KPI_Name = 'Sales Volume (kMT)',
(Sum({ <[TIME_PERIOD]={'PTD'},[HEADER_TYPE]={1},[REP_HEADER_ID]={'SL'}>} AGGR_ACT_PTD)/1000),
)))
Thanks & Regards
Ishaq
 
					
				
		
 alexandros17
		
			alexandros17
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The idea is creating a new table (load * inline) to match KPI_NAME and REP_HEADER_ID so that a value of KPI_NAme correspont to a value of REP_HEADER_ID, in this way you could use only 1 expression ...
Let me know
 
					
				
		
 mato32188
		
			mato32188
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Ishaq,
it is better to create a flag using fields and values mentioned above...
if ( TIMEPERIOD = 'PTD' AND KPI_Name = 'NetProfit', '10',
if (TIMEPERIOD = 'PTD' AND ...
...
... as @TP&KPI (creation depends on what is logic to concat)
Then in expression just use sum({<@TP&KPI = {'10'}>} values) ...
BR
Martin
 fasibaig
		
			fasibaig
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks for the quick replies. Below screen shot shows my requirement. I would like to list all the KPI's in the Chart and Use Set Analysis to show the Values without using IF. Is it possible to use the suggested ideas in this scenario.
Thanks & Regards
Ishaq

