Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik calculation not working

Hi,

The following calculation does not seem to work:

Sum({$<DATE={'$(=date(MAX(DATE)))'}>} Sales)

This has however worked in the past but am not sure whats wrong now.

18 Replies
Not applicable
Author

Ashfaq,

Please find the file attached. I have created a sample, could not sent the original

ashfaq_haseeb
Champion III
Champion III

Hi,

Issue with your field name.

You use wrong field name

Regards

ASHFAQ

ashfaq_haseeb
Champion III
Champion III

try this

=Sum({$<[Run Date]={'$(=date(max([Run Date]),'MM/DD/YYYY'))'}>} COUNT_PASS)

Regards

ASHFAQ

aveeeeeee7en
Specialist III
Specialist III

I have seen you QVW. There is format problem.

SendingIssue.png

I've create an variable for Run_Date and change its format to number.

See the Attachment.

tresesco
MVP
MVP

The working expression is:

=Sum({$<[Run Date]={"$(=date(MAX([Run Date]),'MM/DD/YYYY'))"}>} COUNT_PASS)

Not applicable
Author

Ashfaq,

I do have a field called [Cound Pass] this was a copy paste error while creating the sample app.

ashfaq_haseeb
Champion III
Champion III

Hi,

I have attached working qvw file.

=Sum({$<[Run Date]={'$(=date(max([Run Date]),'MM/DD/YYYY'))'}>} COUNT_PASS)

Regards

ASHFAQ

Not applicable
Author

Thanks for all the help guys! I really appreciate it... This is the best community ever ...

The thing that appears to be working is: Sum({$<[Run Date]={'$(=date(MAX([Run Date])))'}>}[Count Pass])

Which is kind of same as what I posted originally but in the meantime, I have changed the global date and time setting in the script and that appears to have resolved it. The date and timestamp format was mentioned differently and possibly that was causing issues.

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you close this thread by selecting appropriate answer.

Regards

ASHFAQ