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: 
alexpanjhc
Specialist
Specialist

set analysis

Hi I am struggling something maybe very easy for you folks

sum({$<Date = {$(=date(AddMonths(Date,-1),'MMM-YYYY'))}>}  iCount)

date(AddMonths(Date,-1),'MMM-YYYY')) has values . but it showed me zero.

Where is the problem??

3 Replies
Not applicable

I think your problem may be that the field Date (see in bold)

date(AddMonths(Date,-1),'MMM-YYYY')) has values . but it showed me zero.

It is only possible to calculate with this field, when Qlikview recognizes this field as a date/numeric field.

You can check this in the table-viewer (Ctrl + T) and then hover over your Date-field and check if it has the tags date/numeric or timestamp. If for example the displayed tag there is "text" then you know that this is the issue.

What to do then?

Use Date#() function in your loadscript to parse your date from text to date

I'd like to hear the outcome!    

alexpanjhc
Specialist
Specialist
Author

Thank you for your respond.

I hover over on Date in the table viewer and the tag say $timestamp, $date. and i then still used Date#() to format the date, and I still get zeros.

Not applicable

Hi alexpanjhc!

Could you upload your application file? With partial data load, let's say 100 raws.

I believe it helps us to understand it faster.