Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone!
I want to write this expression Count(idOrdine) adding two conditions:
1) if(date(dataGiro)-date(dataOrdine)<=1
2) Num(Frac(dataOrdine))>Num(MakeTime(13,30,00))
What's the correct expression?
I've tried like this: count({<dataOrdine={"num(frac(dataOrdine) > Num(MakeTime(13,30,00))"}>}idOrdine) but It's not working.
Can anyone help me?
Thank you all!
@danimarc12 try below
count({<idOrdine={"=num(frac(dataOrdine) )> Num(MakeTime(13,30,00)) and dataGiro-dataOrdine<=1"}>}idOrdine)
If idOrdine not primary key of your table then try below
count({<Primary_key={"=num(frac(dataOrdine) )> Num(MakeTime(13,30,00)) and dataGiro-dataOrdine<=1"}>}idOrdine)
If you don't have primary key or don't know then simply create in load script with rowno() function
@danimarc12 try below
count({<idOrdine={"=num(frac(dataOrdine) )> Num(MakeTime(13,30,00)) and dataGiro-dataOrdine<=1"}>}idOrdine)
If idOrdine not primary key of your table then try below
count({<Primary_key={"=num(frac(dataOrdine) )> Num(MakeTime(13,30,00)) and dataGiro-dataOrdine<=1"}>}idOrdine)
If you don't have primary key or don't know then simply create in load script with rowno() function
Thank you Kushal,
I would also add a new condition which is Anno = {$(=Max(Anno)-1)} to show the same measure in the last year but it doesn't work, I don't know why.
Also I would like to add a condition like giro={'*BANCO*'} to count how many idOrdine for giro which has into the field "BANCO" word. I don't understand why this conditions don't work.
I use to write " , " and add conditions but now it doesn't work.
Hi,
How about creating a flag in the script and using those flags in the set ?
How should I do it?
this is my expression:
count({<giro={'*PALERMO*'}, idOrdine={"=num(frac(dataOrdine)) > Num(MakeTime(13,30,00)) and dataGiro-dataOrdine<=1"}>}idOrdine)
The first condition (giro=palermo) doesn't work. If I use this Anno = {$(=Max(Anno)-1)} or another one, it doesn't work.
For giro=palermo you should use giro={"*PALERMO*"}