Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
how can i add a variable like "month(today())" to month in below set analysis. thanks
Sum({<year={2013},month={May},day={2}>}TRA_QTY)
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It seems your Month field has not proper data related to the month like there is spaces but the expression =Month(AddMonths(Today(),-1)) gives you May in the result. Before going further you need to decide what are the fields available in the data model according to that you have to use SET expression
Try Once
Sum({<year={2013},month={ '$ (=TRIM(Month(AddMonths(Today(),-1 ))))' }, day={2}>}TRA_QTY)
Because by hard coding you get right result and before posting the question try with post with sample data that will help a lot
But all the expression suggest by members meet your expectation check from your end or provide few lines of sample data.
Regards
Anand
 
					
				
		
hi tresesco,
yes. it s returning values correctly
 
					
				
		
HI all,
this is some what large application and i m unable to provide a sample because the data are privet and confidential. pls if anyone can upload a simple application regarding this then i can understand. thanks
 
					
				
		
hi, my months are returning like Jan, Feb....
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It seems that your month field is not properly created in the script. Create it in the script using month() like:
Load
Month(DateFiel) as month
Then it should work fine.
 
					
				
		
Month(AddMonths(Today(),-1 )))
for this I m getting "May"
 
					
				
		
month(TRA_DATE) as month
i m creating month field like this. because i only have date field in my DB
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Now, it's becoming tougher without seeing your app. See here: Preparing examples for Upload - Reduction and D... | Qlik Community
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can create different field like
Load
Month(TRA_DATE) as Month
Num(Month(TRA_DATE)) as NumMonth
From Location;
And use NumMonth field in SET analysis expression.
 
					
				
		
Hi Manish,
this is having a error
