Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
rviel_dubo
Contributor III
Contributor III

Calculated filter doesn't work in NP 16.5

Hi everyone,

I need help understanding why my calculated filter doesn't work.

Filters.png

First filter work great but the "Current Year" just don't seems to work.

Year_Filter.png

I've got no filter on the chart.

Chart.png

But my result shows all years.

Any suggestion woul dhelp.

Thanks in advance

1 Solution

Accepted Solutions
Daniel_Jenkins
Specialist III
Specialist III

Hi Robert,

I would create a new field using Year(TempDate) instead of date(Yearstart..etc.) in the load script and use that field in the filter.

HTH - Daniel.

View solution in original post

6 Replies
Daniel_Jenkins
Specialist III
Specialist III

Hi Robert,

Perhaps your filter combination returns no records? Do all the years returned include current year? Check the Verify filter check box on the filter and try again. Take a look at this document to learn about Verify filter and other filter parameters: How to Create Static and Dynamic Filters Based on Fields

HTH - Daniel.

rviel_dubo
Contributor III
Contributor III
Author

Hi Daniel,

I've checked the "Verify filter" and got this message on preview.

verified.png

That just prouve that the filter doens't work since I do have records for those specifics filters as shown below.

Result.png

Robert

Daniel_Jenkins
Specialist III
Specialist III

Hi Robert,

That is exactly what I expected. Sales_Year = Year(now()) returns no values. Now I would try to figure out why. What happens if you use a hard coded value (2016) instead of Year(Now())? I will also check the load script to see how Sales_Year is defined. If you upload a simple QVW someone can take a look.

HTH - Daniel.

rviel_dubo
Contributor III
Contributor III
Author

Hi Daniel,

I do get records using 2016 as hard coded filter instead of formula.

Here's a copy of my script for the calendar.

calendar.png

Format number for Sales_Year hasn't been modified

Format.png

I'll try to make a supset of my application to share with you.

Thanks again for your time

Robert

Daniel_Jenkins
Specialist III
Specialist III

Hi Robert,

I would create a new field using Year(TempDate) instead of date(Yearstart..etc.) in the load script and use that field in the filter.

HTH - Daniel.

rviel_dubo
Contributor III
Contributor III
Author

Hi Daniel,

Modified the script and all goes well now.

Thanks a lot