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: 
MattReinders
Contributor II
Contributor II

Expression not Working

Hello All,

This may seem very straight forward. I have the following expression to sum Payment Category (Cash) on the current year. 

Expression: 

= num(sum({<[Fiscal Year] = {$(=vCurrentYear)} >} [Payment Category]='Cash'), '$#,##0')

 

I am not getting the correct number when this expression executes. Is there something incorrect with how I have written the above expression?

Thanks,

Matt

5 Replies
m_woolf
Master II
Master II

Try:

 {'$(vCurrentYear)'}

MattReinders
Contributor II
Contributor II
Author

That did not solve the issue. 

m_woolf
Master II
Master II

It seems like [Payment Category]='Cash' should be part of the Set Analysis and there should be another field to sum (Amount). Hard to say without seeing your data model.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your syntax is incorrect.  What field are you trying to Sum?

 

-Rob

MattReinders
Contributor II
Contributor II
Author

Figured it out. Thanks all. 

=num(sum({<[Fiscal Year] = {'$(vCurrentYear)'},[Payment Category]={'Cash'}>} [Expense Amount USD]),'$#,##0')