Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a small issue.
I have two filters one is from-date and to-date ,when I select this two dates for particular field say project I should get the latest data related to project.
ex:
project-name ,data
project A ,nov-2017
project A,jan-2018
project B,dec-2017
project B,jan 2018
project C,jan 2017
this is my data if i select filter nov-2017 to dec-2018 then for project A The latest data was updated on jan-2018.how can I achieve when i select filter I shoud get the latest month of the project.?
please help me:)
Thanks in advance.
Hi All,
Thanks for your replies.I need a small favour here :
As you uys said I seperated month and year In above example,if I select nov-2015 to dec-2018 as filter .
I am getting latest year for project A that is 2018.but I need latest month also the latest month is Jan.
If I use max(month(data)) it retuns dec , but I need jan.
Thanks in advance.
Hi Prashantji,
may be like below:
Date(max(Date#(data,'MMM-YYYY')),'MMM-YYYY')
Thanks,
Arvind Patil
convert ur data of date format something like 01/urmonth/year and pull max date from this format.
Max(aggr(date,project-name)
or
aggr(max(date),project-name)
try this
A:
LOAD * INLINE [
project-name, data
project A, nov-2017
project A, jan-2018
project B, dec-2017
project B, jan 2018
project C, jan 2017
];
LOAD
*,Date(max(Date#(data,'MMM-YYYY')),'MMM-YYYY') as new
Resident A
Group by "project-name",data;
Hi All,
Thanks for your replies.I need a small favour here :
As you uys said I seperated month and year In above example,if I select nov-2015 to dec-2018 as filter .
I am getting latest year for project A that is 2018.but I need latest month also the latest month is Jan.
If I use max(month(data)) it retuns dec , but I need jan.
Thanks in advance.
Try month() as the outermost function like: = Month(Max(data))