Qlik Community

Ask a Question

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to join same dates in a chart?

Capture.PNG.png

My bar chart report current is as shown above with dates being repeated. Is there any way to join all the same dates so that each bar will represent one date? I am very new in Qlikview.

1 Solution

Accepted Solutions

Hi

Your date field contains a time portion, so you get a value for each distinct time. Date() formats that to look like a date, but it is still has a date/time value. To get pure dates, use

     Date(Floor(DateField)) As Date

Best to do this in script.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies

Hi

Your date field contains a time portion, so you get a value for each distinct time. Date() formats that to look like a date, but it is still has a date/time value. To get pure dates, use

     Date(Floor(DateField)) As Date

Best to do this in script.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

Not applicable

Thank you. Been working on this problem for about 4 hours.

Employee
Employee

Keep in mind that QlikView always stores values as Dual values. That means that the values always have two components, one text part and one numerical part. The text part is the visual value that you actually see in the application, and the underlying numerical part is the one used for calculations and processing.


If you apply the Num() function on your date values, you will see if the underlying number is an integer or a decimal value. For example you could do this in a listbox showing the date field, and then ad an expression to the list box showing the corresponding numerical value for your dates.


Num( DateField )

If your field has underlying decimal values, the value represents a timestamp. The integer part is the date and the decimal part is the fraction of a day that the time represents.

As Jonathan pointed pointed out above you can eliminate the decimal part in a value by using the Floor() function. For an opposite scenario where you want to remove the integer part in order to generate a time value, you can use the Frac() function.

Always keep in mind to validate the underlying values, to ensure your data integrity.