Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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.

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: How to join same dates in a chart?

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
3 Replies
MVP
MVP

Re: How to join same dates in a chart?

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
Not applicable

Re: How to join same dates in a chart?

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

Employee
Employee

Re: How to join same dates in a chart?

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.

Community Browser