Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Tmassimo
		
			Tmassimo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I use this set analysis to filter the data that belong to a week:
sum({$< tt_settimana ={"$(=vSettimana)"}>} tt_hh_inserite)
vSettimana is a variable so defined:
LET vSettimana = year(today()) & '-' & week(today()-7)
And is works correctly.
Now I need to filter the data >= vSettimana. I try some different syntax:
sum({$< tt_settimana ={"$(>=vSettimana)"}>} tt_hh_inserite)
sum({$< tt_settimana ={">=$(=vSettimana)"}>} tt_hh_inserite)
but these don't give me any result.
Can anyone help me, please?
 Tmassimo
		
			Tmassimo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi
this one should work
sum({$< tt_settimana ={">=$(=$(vSettimana))"}>} tt_hh_inserite)
 PrashantSangle
		
			PrashantSangle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 lfetensini
		
			lfetensini
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
The expression cant be walk in up or down because its a "text" with '-' and not a number to be >=. Think about letter D, can E be >=D? Absolutely not.
Change your variable:
OLD (2019-30):
LET vSettimana = year(today()) & '-' & week(today()-7)
NEW (201930):
LET vSettimana = Year(Today()) & Week(Today()-7)
In Set, use:
Sum({<tt_settimana={">=$(=vSettimana)"}>} tt_hh_inserite)
You can ADD a Field in your calendar to walk (Week + 1) ou (Week - 1) between years if necessary. Try it:
AutoNumber(Num(Year(DATAFIELD)*54) + Num(Week(DATAFIELD))) as WeekID
Then use WeekID to do >= or <= and etc.
 Tmassimo
		
			Tmassimo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you,
I removed '-' and now the set analysis works correctly.
 lfetensini
		
			lfetensini
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		"Like" it the answers that are helpful to you and flag as solved the one that helped you solve.
Cheers.
