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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Bo_PT
Contributor III
Contributor III

Filter issue for table chart

Hi, there, I met an interesting issue when creating a simple Qlik Sense app. I added a table into the app and made it display all rows. Here is the load script.

LOAD
date,
charge,
city,
Date(datetime,'yyyy') as fiscal_year
From [source table];

The loaded data is something like this:

date,charge,city,fiscal_year
2/6/2023,$100,New York,2023
9/15/2023,$110,LA,2023
3/23/2024,$101,LA,2024
8/9/2024,$100,Chicago,2024
1/12/2025,$99,New York,2025

All data were displayed well. When I clicked 'New York', all rows associated with 'New York' (row #1 and #5) were high-lighted. The same thing happened if I selected a charge (such as $100). However, when I selected 2023 (fiscal_year), only the first row was high-lighted. Another 2023 row (row #2) was not. It looks like the fiscal_year field displays year, but it somehow still uses date field as its value. How to fix it?

Thanks

Labels (2)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

Try this 

LOAD

    date,

    charge,

    city,

    Year(date) as fiscal_year

From [source table];

View solution in original post

3 Replies
SRA
Partner - Creator
Partner - Creator

Hi,

Date(datetime,'yyyy') is not converting datetime into a year. It is only showing datetime with the 'year' format. So when you select one, you select the date which is behind ; not the year.

You should better use :

Year(datetime) as fiscal_year

Regard

 

Chanty4u
MVP
MVP

Try this 

LOAD

    date,

    charge,

    city,

    Year(date) as fiscal_year

From [source table];

Bo_PT
Contributor III
Contributor III
Author

Thanks you both. It works.