Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i want to filter data according to the time field "create_time" in an expression:
Count(
{$<
[create_time]={'>=$(=$(time_1530))'}
>}
DISTINCT [order#]
)
"time_1530" is defined as Time#('15:30')
then it shows no data at all
by removing the set analysis the result shows properly
so is there any problem with my expression?
thanks for any help
Hi Jerry,
Would like to know is the field "create_time" really a time? Why I asked this is because when I convert it to a number by using num(create_time), it gives me a negative number. But your variable time_1530 is a positive number and that's why your formula does not work. If you can get the field create_time back to a normal time field, everything should work ok.
Herman
Try changing the simple quotations ( ' ) with double quotations ( " ). Sometimes it only works this way
thanks for your prompt response, but it does not work too
Change the "time_1530" SET variable from Time#('15:30') to Time('15:30').
PFA
ur attachment works fine
but it just does not work for mine
So I think that the only possibility is that the [create_time] field is not properly created and QV cannot compare it to a time value. It would be helpful if you could post more information about how it's created in the script.
actually i hv such a suspicion before
but then i hv tested it with a text object
=if([create_time]<$(time_1530),'yes','no') // with listbox selection of 1 value only
and it works fine, so i expect the create_time should be in proper data type
for your information, my data source is sap
i load the create_time field without any data type casting
I'm running out of ideas.... the last one I have, have you tried changing the SET variable for a LET variable?
i create the var in settings->variable directly
does it matter?
try converting both these in number format. that is while loading user this in scripting num(create_time) as create_time ,
while creating variable for time user which you are using in the set analysis again use num.
As you are using comparison of greater than or less than it might be an issue of comparing. Set analysis some times take it as text field rather than numeric