Qlik Community

Qlik GeoAnalytics Discussions

Discussion Board for collaboration regarding Qlik GeoAnalytics.

Not applicable

Picking specific data for the given year

Hi, I am trying to load a data from a table which has few columns with one column as a year. When i use the following function it works


but when I use  the following function it returns nothing.


ValidForYear is the column with year and DeliveryDate is the Calendar date.

I need to get the value from "NetMaximumCapacity" for the year selected by user based on data in other tables where "DeliveryDate" is used as date and time field.

3 Replies

Re: Picking specific data for the given year

May be try adding a max in there and see if that helps


Not applicable

Re: Picking specific data for the given year

Thanks Sunny, I couldn't explain it properly. I want to get a value from DIM_PLANT table for a specific year as given in field "ValidForYear" in a time series graph, here is the image of the data tables in general and DIM_PLANT. I want values as per the below graph. Expression "Sum({$<ValidForYear={$(=Year(Max(DeliveryDate)))}>}NetMaximumCapacity)" give me values for just 2017 but I want the values to change as per the year based on Date.

Thanks for your time and response.

Expected output.PNGDIM_Plant_table.PNGQlik_Data_tables.PNG

Re: Picking specific data for the given year

How about try just the if statement then

Sum(If(ValidForYear = Year(DeliveryDate), NetMaximumCapacity))

Community Browser