Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser09
Creator II
Creator II

compare count between previous year and current year using Line chart

Im trying to compare distinct ID count between curretn year and previous year , i have a field called InPreviousYear and In Current year in my calendar table how ever the below set analysis doest not give my any result

Count({<InPreviousYear={1}>}Distinct[ID])

It says the chart is not dispalyed because it contains only undefined values

Labels (1)
1 Solution

Accepted Solutions
Dalton_Ruer
Support
Support

Your syntax seems fine. 

Create a plain old table and throw in your ID, date, and InPreviousYear and InCurrentYear values to ensure that you actually have values for InPreviousYear, InCurrentYear. Or check your data model to see if your calendar table and data table are actually connected or if they are data islands for some reason like field name for date not being exact match or something. 

View solution in original post

2 Replies
Dalton_Ruer
Support
Support

Your syntax seems fine. 

Create a plain old table and throw in your ID, date, and InPreviousYear and InCurrentYear values to ensure that you actually have values for InPreviousYear, InCurrentYear. Or check your data model to see if your calendar table and data table are actually connected or if they are data islands for some reason like field name for date not being exact match or something. 

vinieme12
Champion III
Champion III

Refer below article

On X-Axis , if you have checked Continuous Axis ensure the dimension used is an actual Date field or a Numeric field

vinieme12_0-1669700183323.png

 

https://community.qlik.com/t5/Official-Support-Articles/The-Chart-is-not-Displayed-Because-it-Contai...

 

You can verify if your date field is correctly formatted as dates by using expression   

ISNUM(Datefield) 

, if this returns -1 means the field is correctly formatted as Dates

 if this returns 0 means the field is NOT formatted as Dates

 

format the date field using the Date() function as below  during data load

Date(YourDateField,'YYYY-MM-DD')  as YourDateField

replace  YYYY-MM-DD with the date format you need to use

 

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.