Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Actually I am running this script in SQL server ,
select branch, count(ID)
FROM XYZ where (date(Field1)+day(15)) <= GETDATE() group by branch
This is my Qlikview expression :
=Count(If((Date(Field1) + 15) <= DATE(now()),ID)
Both are giving different counts.
Also TODAY() function doesn't gives today's date in Qlikview.
Check for Today(0), Today(1) and Today(2)
As You have Group By in script,
may be you need Aggr(...,branch) and optionally DISTINCT
Regards,
Antonio
I think no need of AGGR() bcoz I am using Branch as a list box.
Today(0), Today(1) and Today(2): Gives same count as before.
May be try this
Count(DISTINCT {<Field1 = {"$(='<=' & Date(Today() - 15))"}>} ID)
Where check that =Date(Today() - 15) gives the date you are looking for and in the format of Field1 date field.
UPDATE: Added '<=' & to fix my expression to look at Field1 where is it less than or equal to Today()-15
Count(DISTINCT {<Field1 = {"$(=Date(Today() - 15))"}>} ID) what Sunny said looks correct to me as well