Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Try this
LOAD
date,
charge,
city,
Year(date) as fiscal_year
From [source table];
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
Try this
LOAD
date,
charge,
city,
Year(date) as fiscal_year
From [source table];
Thanks you both. It works.