Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need to calculate by Current Month and Year

I need to calculate the closing balance of the transaction which is having 3 fields

1. Transdate as [TRANSDATE]

2.Account Number as [ACCOUNTNUM]

3. Closing balance as [Closing_fld]

I defined the expression which is below not working, please correct me where I did mistake ("Error in Expression")

SUM(

{$<

[TRANSDATE.autoCalendar.Year] = {YEAR(Today()},[TRANSDATE.autoCalendar.Month] = {>month(today())},

[ACCOUNTNUM] = {'>=$410010<=$440000'}

>}

[Closing_fld])

14 Replies
Anonymous
Not applicable
Author

but is works either or condtion

Anil_Babu_Samineni

Will you able to provide sample application to test, I am assuming Year and Month not sure how data model maps together.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

possible to connect remotely?

Anil_Babu_Samineni

No, This helps

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Further I created 2 variable which

1. vCurYear=NUM((year(Today())))

2. vCurMonth==NUM((MONTH(Today())))

I defined the expression below, even not working. But I confirm the variable appear the result correctly as 11 and 2017 by Extenstion QsVariable.

SUM(

{$<

[TRANSDATE.autoCalendar.Year] = {'$(#vCurYear)'},[TRANSDATE.autoCalendar.Month] = {">=$(#vCurMonth)<=$(#vCurMonth)"},

[ACCOUNTNUM] = {'>=$410010<=$440000'}

>}

[Closing_fld])

I'm getting tired to find the result, please help.