Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Suppose I have a date filed and max date is 31/12/2014 (DD/MM/YYYY) and I have to make a expression as on date. How we can make a expression = to count of employeeheadcpunt on the behalf of same date. But want as on date employeeheadcount.
Thanks.
COUNT({<Date = {'31/12/2014'}>}Employee)
or
COUNT({<Date = {'$(=Max(Date))'}>}Employee)
OR
COUNT({<Date = {'31/12/2014'}>}Distinct Employee)
or
COUNT({<Date = {'$(=Max(Date))'}>}Distinct Employee)
Hi
Try like this
Count({<Date = {"$(=Date(Max(Date)),'DD/MM/YYYY')"}>}Distinct employeehead)
Try this
Create variable vMaxDate=Date(Max(Date),'DD/MM/YYYY')
COUNT({<Date = {"<=$(vMaxDate)"}>}Employee)
or
COUNT({<Date = {"<=$(vMaxDate)"}>}Distinct Employee)
But suppose Today is 10/04/2014, I don't want maxdate, of my dimension fields. In my database till 2016 data is available, but whatever date is today and when my qvd is refreshed last time, I want till date data.
Thanks
From max date you get max value which is your database date field like with this script
Count({< Date = {'$(=Date(Max(Date)),'DD/MM/YYYY')}>} employeehead)
Such case use this for variable
vMaxDate=Date(Today(),'DD/MM/YYYY')
In Case My QVD is not reloaded and yesterday data is there, then it will not use today() function.
Use this
vMaxDate=Date(ReloadTime())