Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the attached document I am trying create an expression where it will count the PK field where the field DatePromised is greater than or equal than todays date, but the expression I have does not seem t be working?
Thanks
Alternatively, I think it would be better to create a date field (without the time component) in the script and use that for set analysis. Something like this:
Fact:
LOAD PK,
DateEntered,
DatePromised,
Date(Floor(DatePromised)) as Date
Qty,
Area
FROM
C:\Qlikview\QVOrdersExample.xlsx
(ooxml, embedded labels, table is Sheet1);
and then your expression:
Count({$<Date={"$(='>=' & Date(Today()))"}>}PK)
Try this expression:
Count({$<[DatePromised]={"=Date(Floor(DatePromised)) >= Today()"}>}PK)
Alternatively, I think it would be better to create a date field (without the time component) in the script and use that for set analysis. Something like this:
Fact:
LOAD PK,
DateEntered,
DatePromised,
Date(Floor(DatePromised)) as Date
Qty,
Area
FROM
C:\Qlikview\QVOrdersExample.xlsx
(ooxml, embedded labels, table is Sheet1);
and then your expression:
Count({$<Date={"$(='>=' & Date(Today()))"}>}PK)
Thanks Sunny, I was using the Date function i.e Date(DatePromised,'DD/MM/YYYY') but was not liking it.
Without Floor() you might format your date as DD/MM/YYYY, but it won't remove the time component. To remove time component from your TimeStamp Field you need to use Floor function.