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
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)
Please see the attached and hope this helps. (Today's date is 31-Jul-2016). So I have two records which belong to 31-Jul-2016 and they are displayed on the pivot.
Can you please Explain more which demonstrates the issue?
Please try to share raw data with expected o/p
Read about dates in set analysis here:
In general read about dates
Thanks for answer, but i cannot opern it since I have only Personal edition of Qlikview.
Can you paste the expression?
I tried something like this:
Sum({<[Date1]={"$(=Date(Today()))"}>} Time)
but it doesn't work
What is your date field format here? May be you have to do something like this:
Sum({<[Date1]={"$(=Date(Today(), 'DateFieldFormatHere'))"}>} Time)
Where this -> DateFieldFormatHere is a placeholder and replace it with your Date1 Field's format
Here is the expression:
Sum({<[Date 1]={'$(=Today())'}>} Time)
If this doesn't work, please follow what Sunny is suggesting. Hope this helps...
Thanks, but it doesn't work
I tried to format it but it doesn't help.
BTW I don't really understand why should I format it since it is actually a number (when I put the value of the filed Date1 to table and format it as a number is is shown like 42582 or similiar.
Please provide a sample app, so that we can take a look and suggest...