Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have a date field in Number format like original date below.I have converted that number format date to DD-MM-YY Format date like below with below script.
Date(Remedy_Date,'DD-MM-YY') AS Remedy_Date,
In the text box I have taken the max date like '$(=Max([Remedy_Date]))' then I got the correct date as 09-09-17.
But while taking Min date like '$(=(Max([Remedy_Date])-1))' getting number format and wrong number also.
Please help me on Min date.
Thanks in advance
Then try this in text box
'$(=Date (Max([Remedy_Date])-1))'
'$(=Date (Min([Remedy_Date])-1))'
When you talk about Min date it should min, Right? '$(=(Min([Remedy_Date])))'
And for your question, Because of -1 it it reverting to Number format so then you should use this
'$(=(Date(Max([Remedy_Date])-1,'DD-MM-YY')))'
for minimum date take
'$(=Min([Remedy_Date]))'
Sorry wrong suggestion it will be MIN not MAX
'$(=Date (Min([Remedy_Date])-1))'
Hi Bhavani,
Try this,
'$(=Date (Min([Remedy_Date])))'
Regards,
Pratik Bhor
Hi Anil
Thanks for you reply. Actually I am expecting second max date. I have tried like the expression you have provided.
But I am getting 08-09-17 not 08-08-17
What if you are written this? '$(=(Max([Remedy_Date], 2)))'
try below
=FirstSortedValue ([Remedy_Date],-[Remedy_Date],2)
In any text object how you can use Max([Remedy_Date], 2) you need to aggregate then by your fields then you get the output or you can do this in the loading script.
Fact:
Load
[Remedy_Date],
...
...
From Source;
MaxMinDates:
Load
[Remedy_Date],
Min([Remedy_Date]) as MaxDate,
Max([Remedy_Date]) as MaxDateOne,
Max([Remedy_Date],2) as MaxDateTwo
From Source
Group By [Remedy_Date];
And then use this fields in UI part.
Hope this helps you