Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I have 3 dates for one particular selection.
I have another 4 dates depends on current dates.
I need to identify how may values from Dates field falls under Last 4 Week Days field. I need that count. In the below example there is no matching values. So it should return Zero (0).
Please help.
Thanks,
Sarif
You could try something like
Count(DISTINCT
{<Dates = {"$(=Date(Date#('$(vDATE)','M/D/YYYY') - 7))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 14))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 21))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 28))"} >}
Dates)
May be like this:
Count(DISTINCT {<Dates = p([Last 4 Week Days])>}Dates)
I think it is working. Let me test properly and will let u know.
Thanks,
Sarif
Sure thing
Hi Sunny,
One problem is there in my App.
I am creating the Last 4 Week Day in the back end. Below is the script:
LASTDT:
LOAD max(Z_DATE) as LASTDT
RESIDENT ORD_VOL;
LET vDATE = Date(Date#(Peek('LASTDT',0,'LASTDT'),'YYYYMMDD'),'M/D/YYYY');
LET v_DT7_1 = Date(Date#('$(vDATE)','M/D/YYYY') - 7);
LET v_DT14_1 = Date(Date#('$(vDATE)','M/D/YYYY') - 14);
LET v_DT21_1 = Date(Date#('$(vDATE)','M/D/YYYY') - 21);
LET v_DT28_1 = Date(Date#('$(vDATE)','M/D/YYYY') - 28);
Last4Weekday:
LOAD * INLINE
[
Last4Weekday
'$(v_DT7_1)',
'$(v_DT14_1)',
'$(v_DT21_1)',
'$(v_DT28_1)'
];
But the we have an extension in front end for vDATE.
If I am selecting any other day from the extension, it is not reflecting in Last4Weekday table.
Is there any way to create this Last4Weekday table in front end?
Thanks,
Sarif
I am trying to write the below script. But is not working:
Count( {$<Dates = P({$<Dates={'$(vDATE)',Date(Date#('$(vDATE)','M/D/YYYY') - 7)}>})>} Dates)
Thanks,
Sarif
You could try something like
Count(DISTINCT
{<Dates = {"$(=Date(Date#('$(vDATE)','M/D/YYYY') - 7))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 14))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 21))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 28))"} >}
Dates)