Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with date in Set analysis

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

1 Solution

Accepted Solutions
sunny_talwar

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)


Capture.PNG

View solution in original post

15 Replies
trdandamudi
Master II
Master II

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.

Only_Names_With_Todays_Date.jpg

Anil_Babu_Samineni

Can you please Explain more which demonstrates the issue?

Please try to share raw data with expected o/p

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Read about dates in set analysis here:

Dates in Set Analysis

In general read about dates

Get the Dates Right

Why don’t my dates work?

Not applicable
Author

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

sunny_talwar

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

trdandamudi
Master II
Master II

Here is the expression:

Sum({<[Date 1]={'$(=Today())'}>} Time)

If this doesn't work, please follow what Sunny is suggesting. Hope this helps...

Not applicable
Author

Thanks, but it doesn't work

Not applicable
Author

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.

trdandamudi
Master II
Master II

Please provide a sample app, so that we can take a look and suggest...