Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JASalinas
Creator
Creator

Date breaks my Set expression

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

Labels (2)
3 Replies
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
Creator
Creator
Author

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
Creator
Creator
Author

Hyi My Friend... Don't work this solution!...