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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Syntax Error

Hi Expert,

Can somebody help me with the syntax formula. I dont know whats wrong.?

Thanks

sum({<Age={">=0<=30"}>} If (Transactions.Pending = 0 or IsNull(Transactions.Pending),

if ((Match ([Transactions.Txn Type], 'Receive Payment', 'Credit Memo', 'CreditCardCredit') or (Match ([Transactions.Txn Type], 'Journal') and Match([Transactions.Debit Or Credit], 'Credit'))), -[Transactions.Balance Remaining], [Transactions.Balance Remaining])))

4 Replies
sunny_talwar

What is the issue? Are you getting an error or incorrect result?

Anonymous
Not applicable
Author

incorrect result I'm sorry for the term error. I am making aging Thanks

sunny_talwar

So can you explain in words what exactly this if statement needs to do?

Anonymous
Not applicable
Author

Hi Sunny,

Thanks

I was trying to edit QBAR - Starter report for Aging please see below snaps.

My problem is Im not getting sum.

this formula works but no sum.

if((Age >= 0) and (Age <= 30),OpenBalance*1,0)

if((Age >= 31) and (Age <= 60),OpenBalance*1,0)

if((Age >= 61) and (Age <= 90),OpenBalance*1,0)

if((Age >= 121),OpenBalance*1,0)

I name columns / expression as

Age:

_ReportFilterAsOfDate - Date

OpenBalance:

sum(If (Transactions.Pending = 0 or IsNull(Transactions.Pending),

if ((Match ([Transactions.Txn Type], 'Receive Payment', 'Credit Memo', 'CreditCardCredit') or (Match ([Transactions.Txn Type], 'Journal') and Match([Transactions.Debit Or Credit], 'Credit'))), -[Transactions.Balance Remaining], [Transactions.Balance Remaining])))

the OpenBalance code is from QB.

so i try this/ result is incorrect

sum({<Age={">=0<=30"}>} If (Transactions.Pending = 0 or IsNull(Transactions.Pending),

if ((Match ([Transactions.Txn Type], 'Receive Payment', 'Credit Memo', 'CreditCardCredit') or (Match ([Transactions.Txn Type], 'Journal') and Match([Transactions.Debit Or Credit], 'Credit'))), -[Transactions.Balance Remaining], [Transactions.Balance Remaining])))

Capture222.PNG