Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I am trying to find the number of quotes that started after the current date selection ( I have a calendar set up). The expression I use is Count({<StartTime= {">=$(getFieldSelections(eventDate))"}>} StartTime). I checked that getFieldSelections(eventDate) returns the correct date selections (say 6/4/2020). However, this expression returns 4 instead of 7
Can you try..?
Count({<StartTime= {">=Date($(getFieldSelections(eventDate)))"}>} StartTime).
@Saravanan_Desingh It returns 0 😞
I forgot to put that I use a date picker given by the dashboard bundle to filter the data, if that changes anything
Can you also try this once? With single quote around Date.
Count({<StartTime= {">=Date('$(getFieldSelections(eventDate))')"}>} StartTime).
This is Expression in Search. We might need '='
Count({<StartTime= {">=Date('$(=getFieldSelections(eventDate))')"}>} StartTime).
@Saravanan_Desingh I put the date inside the $, so Count({<StartTime ={ ">=$(Date(getFieldSelections(eventDate)))"}>} StartTime) and that returned 5, but that is just the number of quotes that started on 6/4/2020 (my image didn't capture it all but there are a total of 5 that start at 6/4/2020. I think it might be the fact that when I pick a date, the data reduces to those that relate to 6/4/2020 and therefore, excluding the ones after 6/4/2020.
I think the Date function should be outside of $-expansion.
But that returns 0 for me
This is working for me.
=Count({<StartTime= {"=Date(StartTime)>=Date('$(=getFieldSelections(eventDate))')"}>} StartTime)
Is it because the table I have that contains the quote number, start and latest come from a bigger table that contains event date? Here is my script
Temp:
LOAD
eventId,
TimeStamp(TimeStamp#(eventDateTime, 'YYYY-MM-DD hh:mm:ss.fff')) as eventDateTime,
Date(floor(TimeStamp#(eventDateTime, 'YYYY-MM-DD hh:mm:ss.fff'))) as eventDate,
eventName,
eventType,
systemId,
environment,
"userId",
userFirstName,
userLastName,
producerTransactionId,
triggerDescription,
quoteNumber,
policyNumber,
ratingReferenceNumber,
agentNumber,
applicationSignedState,
licensingCheckResult,
esignatureStatus,
applicaitonDecision,
if (applicaitonDecision = 'Approved', 1, 0) as Decision
FROM [lib://DataFiles/Mock Data (2).xlsx]
(ooxml, embedded labels, table is Sheet1);
A:
LOAD
Date(Max(eventDate)) as LatestTime,
Date(Min(eventDate)) as StartTime,
quoteNumber,
if (Sum(Decision) = 1, 'Taken', 'Not Taken') as AppDecison
Resident Temp Group By quoteNumber;
may be try creating variable and use it in set analysis
Create variable on front end as vMaxDate and put below expression
= date(max(eventDate))
Now you can use your actual expression as below
Count({<StartTime= {">=$(vMaxDate)"}>} StartTime)