Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Milaf
		
			Milaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
There is an issue that I have to solve very quickly and I wanted to consult your knowledge. I have a table where the data of each month is kept in a separate column and in the table I want to create, I should show the actual values such as this month, last month, 3 months ago.
I created the following parameter to get the month I want from the columns: 
vActual: ='Act_'& [Month(Num)] 
(gives October data: like Act_10.)
For 3 Months before
v3MonthsAgo: =Date(AddMonths(Max(YearMonth),-2),'YYYYYMM')
sum({<“$(v3MonthsAgo)”= $(v3MonthsAgo)>} “$(vActual)")
However, in all cases, it shows the last month's realization. How can I fix this?
 Milaf
		
			Milaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I hope someone can see the question 🙏
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@Milaf How your month column name is? Is it Act_202401, Act_202402? If so, 3 months ago means sum of Act_202410+Act_202409+Act_202408?
 Milaf
		
			Milaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Column Name: ACT_1, ACT_2...ACT_11, ACT_12 (just month num)
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@Milaf Then how YearMonth field plays a role here? 3MonthsAgo means ACT_10+ACT_9+ACT_8?
 Milaf
		
			Milaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		No, it shows the value 3 months ago. I need this visualization;
 p_verkooijen
		
			p_verkooijen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi @Milaf
The variable v3MonthsAgo has 5 Y's instead of 4
=Date(AddMonths(Max(YearMonth),-2),'YYYYYMM') = 0202409
=Date(AddMonths(Max(YearMonth),-2),'YYYYMM') = 202409
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@Milaf Assuming your MonthYear field Format is YYYYMM
v3MonthsAgo: =Date(addmonths(date#(Max(YearMonth),'YYYYMM'),-2),'YYYYMM')
sum({<YearMonth= {">=$(v3MonthsAgo)"}>} [$(vActual)])
 Milaf
		
			Milaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I wrote it wrong here, the format is correct in the parameter.
 Milaf
		
			Milaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Unfortunately it didn't work. No matter how I change the parameter, it brings the actual value of the current month.
I added the value of all fields for detailed analysis.
