Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
kidbank3
Contributor III

Max function issue

I binary loaded my app on 12/1 using Sense version April 2018.  I upgraded on 12/2 to September 2018 and re-run my binary load a few days later.  My max function stops working.  For load on 12/1 it returns a number like 43434.  On load after upgrade it returns a formatted month year like Oct-2018.  

What could be causing this?  Does this sound upgrade related or some other issue?  

Labels (1)
11 Replies
GoLeR797370
New Contributor

Re: Max function issue

can you include the picture?

kidbank3
Contributor III

Re: Max function issue

 
kidbank3
Contributor III

Re: Max function issue

 
kidbank3
Contributor III

Re: Max function issue

That's the best i can do. I've made no changes to my binary load app. Data has updated between the two loads. Could that be driving the issue?
manisha_qlik
New Contributor

Re: Max function issue

What is your source for data, is it flat files? We are using June,2018 version, but it doesn't look like issue with upgrade.

Check your app which you are adding using binary load and see what it is returning. Use Date function to change to the proper date value before adding any formatting function to that date field.

kidbank3
Contributor III

Re: Max function issue

The binary app shows the same issue and no code changes have been made to the binary.  We are not using a flat file for a data source

manisha_qlik
New Contributor

Re: Max function issue

From 1st image, I can see your date field is showing some decimals also after number. Does it has time? If you don't need time, then use below  and check if it is returning correct numbers.

Date(Floor(Date Field)) as Date Field

MVP & Luminary
MVP & Luminary

Re: Max function issue

43434 is the numeric representation of a date. All you need to do is format it as a date using the Date() function.


talk is cheap, supply exceeds demand
kidbank3
Contributor III

Re: Max function issue

Gysbert, 

Thanks for the reply.  I'm able to fix the issue, but still just wondering about the cause.  I use max(MonthYear) a lot and I have no idea why the return value would change between reloads.  To go a little deeper into my issue, I'm really coding the expression below.  It has been working in my dashboards but after reload and version update, it doesn't work: 

=Aggr(
Only(
{<
[Month Year]={">$(=MonthEnd(Max([Month Year]),-11))<=$(=Max([Month Year]))"}
>}
[Month Year])
,[Month Year])

 

THIS EXPRESSION SEEMS TO CORRECT MY ISSUE BUT I'M MORE CONCERNED ABOUT CAUSE THEN FIX. WHY WOULD THIS WORK?

=Aggr(
Only(
{<[Month Year]={">$(=date(MonthEnd(Max([Month Year]),-11),'MMM-YY'))<=$(=num(max([Month Year])))"}
>}
[Month Year])
,[Month Year])