Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I am new to QlikView and I have a problem with comparing dates in Set analysis.
I have a simple table from SQL CE with columns: [Date1],[Name],[Time] and I want to show in pivot table only names with today's date.
How to do this using Today() function and Set Analysis?
TIA
If it is number, then try this
Sum({<[Date1]={"$(=Num(Today()))"}>} Time)
Hi
Here is the sample. nl2.sdf is the datasource. The sample is in Polish, Czas means Time and Data1 is Date1.
Thanks for help
Try this:
Sum({<[Data1]={"$(=Date(Today(1), 'YYYY-MM-DD hh:mm:ss'))"}>} Czas)
For your attached sample you don't have Today's date in it, so I am posting the sample qvw with yesterday's date
Sum({<[Data1]={"$(=Date(Today(1)-1, 'YYYY-MM-DD hh:mm:ss'))"}>} Czas)
As you do not have personal edition I am not attaching the file. As you do not have any records for today's date I did used yesterday date.Please use the below expression:
For yesterday's date:
Sum({<[date(Date#(Data1,'DD-MM-YYYY hh:mm:ss'),'DD/MM/YYY')]={"$(=Date(Today(1)-1"}>} Czas)
OR
Sum({<[Data1]={"$(=Date(Today(1)-1, 'YYYY-MM-DD hh:mm:ss'))"}>} Czas)
For Today's date use the below expression:
Sum({<[date(Date#(Data1,'DD-MM-YYYY hh:mm:ss'),'DD/MM/YYY')]={"$(=Date(Today(1)"}>} Czas)
OR
Sum({<[Data1]={"$(=Date(Today(1), 'YYYY-MM-DD hh:mm:ss'))"}>} Czas)
Also please note that Sunny also provided a working solution. So feel free which ever expression you want to use. Hope this helps.
Thanks both solutions are great!
Thanks for teaching us a little polish.... Happy Qliking.....