Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

abo_saretec
New Contributor II

Max value between 4 fields is script load

Hi,

I'm trying to create a new field in the load script which indicate the max date of 4 other fields (DateFacture, DateRapport, DateRDV and DatePriseRDV).

It should be pretty straightforward, but, for some reason, I'm not able to get it right.

Could you help me ?

Thanks

Aurore

1 Solution

Accepted Solutions
MVP
MVP

Re: Max value between 4 fields is script load

May be used RangeMax() function

LOAD Date(RangeMax(DateFacture, DateRapport, DateRDV, DatePriseRDV)) as MaxDate

5 Replies
MVP
MVP

Re: Max value between 4 fields is script load

May be used RangeMax() function

LOAD Date(RangeMax(DateFacture, DateRapport, DateRDV, DatePriseRDV)) as MaxDate

abo_saretec
New Contributor II

Re: Max value between 4 fields is script load

Thanks,

It seems to work but I've juste realised that :

- DateRDV and DatePriseRDV are in date format "DD/MM/YYYY"

- DateFacture are DateRapport,are in timestamp format "DD/MM/YYYY hh:mm"

so it only calculates max value between DateRDV and DatePriseRDV

Re: Max value between 4 fields is script load

You can go for what Sunny has suggested.

abo_saretec
New Contributor II

Re: Max value between 4 fields is script load

I've found the solution in the end :

I've changed the format of my timestamp value using :

date(Timestamp#([DateFacture],'DD/MM/YYYY hh:mm'))

Thank you Sunny !

MVP
MVP

Re: Max value between 4 fields is script load

No problem