Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
JASalinas
Contributor III
Contributor III

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 (5)
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
Contributor III
Contributor III
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
Contributor III
Contributor III
Author

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