Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 JASalinas
		
			JASalinas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello friends,
I have the follwing expression:
Sum({<[ACCNT_CODE]={"=Aggr(Sum([AMOUNT]),ACCNT_CODE)<0"}> - (1-$<[ACCNT_CODE]={"12*", "13*", "14*","32*", "33*", "34*","A*", "E*", "R*"}>}[AMOUNT]) and it works, this expression <[ACCNT_CODE]={"=Aggr(Sum([AMOUNT]),ACCNT_CODE)<0"}> groups the balance of all accounts that are less than zero, the following expression (1-$<[ACCNT_CODE]={"12*", "13*", "14*","32*", "33*", "34*","A*", "E*", "R*"}> filters the accounts that I need, but if I also want to filter by DATE or [Year]={"<=2020"} my expression breaks for ex.
Sum({<[ACCNT_CODE]={"=Aggr(Sum([AMOUNT]),ACCNT_CODE)<0"}> - (1-$<[ACCNT_CODE]={"12*", "13*", "14*","32*", "33*", "34*","A*", "E*", "R*"}> +<[Year]={"<=2020"}>}[AMOUNT]) or
Sum({<[ACCNT_CODE]={"=Aggr(Sum([AMOUNT]),ACCNT_CODE)<0"},[Year]={"<=2020"}> - (1-$<[ACCNT_CODE]={"12*", "13*", "14*","32*", "33*", "34*","A*", "E*", "R*"}>}[AMOUNT])
Please help me and thanks in advance
 rubenmarin
		
			rubenmarin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Maybe with?: Sum({(<[ACCNT_CODE]={"=Aggr(Sum([AMOUNT]),ACCNT_CODE)<0"}> - (1-$<[ACCNT_CODE]={"12*", "13*", "14*","32*", "33*", "34*","A*", "E*", "R*"}>) *<[Year]={"<=2020"}>}[AMOUNT])
If you use your working expression and manually select Year<=2000, it works? if its not working manually then the issue need to be solved in data model.
 JASalinas
		
			JASalinas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Rubenmarin first, thank you for your answer. And answering your question, yes the set Analysis is working manually. I will try your suggestion.. I will tell you later.
 JASalinas
		
			JASalinas
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hyi My Friend... Don't work this solution!...
