Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mgranillo
Specialist
Specialist

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
Partner - Contributor
Partner - Contributor

can you include the picture?

mgranillo
Specialist
Specialist
Author

 
mgranillo
Specialist
Specialist
Author

 
mgranillo
Specialist
Specialist
Author

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
Contributor
Contributor

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.

mgranillo
Specialist
Specialist
Author

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
Contributor
Contributor

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

Gysbert_Wassenaar

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
mgranillo
Specialist
Specialist
Author

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])