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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anku
Creator
Creator

Date issue

Hi all,

I am creating a line chart, refer below.

IMG_20211104_130430.jpg

As you can see it's not following the expected pattern.

I have also used date(date#(datadate,'dd-mmm-yyyy'),'mmm d'). 

Please suggest how to fix this discrepancy.

Note: measure : sum(sales)

Thank you.

1 Solution

Accepted Solutions
rubenmarin

Hi, it's a format issue, your date field in the sales table has a DD/MM/YYYY format , and it's a date, (by default rigth aligned), the date field in the calendar is in DD/MMM/YYYY format and it's a string (by default left aligned).

I switched the name of the dates and date fields in the calendar and it seems to work. Also added a new script sheet using a master calendr to avoid that you have to write each day.

There are still some values with null, it's because of this expression:

If(DayNumberOfYear(Today(1))>DayNumberOfYear(Date)
,Dual(Date(Date,'MMM D'),DayNumberOfYear(Date))
,Null()) as YearDayNoYTD // Number of days above today will get null()

If you don't want to show this values, expand the YearDayNoYTD dimension and uncheck the option to show null values.

View solution in original post

3 Replies
rubenmarin

Hi, thats the null values, those are records with values on sales fields that doesn't has any relation with the datadate field.

You can add a table with datadate as dimesnion ans sum(sales) as expression, and add some dimesnions to check where those values come from and why they don't have a date associated.

Anku
Creator
Creator
Author

@rubenmarin 

Yes, I tried to figure out but unable to get a solution. I have attached the dummy data. Kindly assist and share your feedback. Thanks!

Please note, It's a dummy data with the similar issue.

rubenmarin

Hi, it's a format issue, your date field in the sales table has a DD/MM/YYYY format , and it's a date, (by default rigth aligned), the date field in the calendar is in DD/MMM/YYYY format and it's a string (by default left aligned).

I switched the name of the dates and date fields in the calendar and it seems to work. Also added a new script sheet using a master calendr to avoid that you have to write each day.

There are still some values with null, it's because of this expression:

If(DayNumberOfYear(Today(1))>DayNumberOfYear(Date)
,Dual(Date(Date,'MMM D'),DayNumberOfYear(Date))
,Null()) as YearDayNoYTD // Number of days above today will get null()

If you don't want to show this values, expand the YearDayNoYTD dimension and uncheck the option to show null values.