Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Greater and less than Filter Nprinting 17

Hello

I have a field name _MonthNum (he gave me the number between 1 and 12) and i would like to create a filter on this field.

And i would like to obtain all the monthNum < max(_MonthNum).

I try a lot but i can't find a solution yet.

Thanks.

5 Replies
Kostas_Lag
Partner - Contributor III
Partner - Contributor III

Hi Matthieu,

I think this also answers your question..

Advanced Search filters in NPrinting 17.5

Best regards,

Kostas

bramkn
Partner - Specialist
Partner - Specialist

Hi,

There is a work around for this. Create a new table containing all possible values. Filter on that in NPrinting. And with this value you can do a set analysis <= like u usually do.

Hope I was clear enough, if not I can create an example.

Best regards,

Bram

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Could you create en example of this?

Chanty4u
MVP
MVP

create this as column in Qlik

and use that field as filter for report or task.

bramkn
Partner - Specialist
Partner - Specialist

This is how I have it:

I added this to the kalendar:

Num(Year(TempDate) & ',' & num(Month(TempDate))) AS Kalender.MaandJaarNummer, // results in: <year>,<Month>

Added this table to use in the NPrinting filter:

ReportKalender:

Noconcatenate load

distinct Kalender.MaandJaarNummer AS Rapport_MaandJaarNummer

Resident Kalender;

You can then for example use 2017,12 as a cumulative filter for 2017 all months (keep in mind , is decimal here in the netherlands not the .)

In your set analysis you use this to calculate the month (same for year with subfield 1:

=if(max([Rapport_MaandJaarNummer]) < num(Year(Today()) & ',' & num(Month(Today()))),subfield([Rapport_MaandJaarNummer],',',2),num(month(addmonths(Today(),-1))))

And this in the set analysis you are using on the calculation:

[Kalender.Jaar]={$(vRapportJaar)},[Kalender.MaandNummer]={"<=$(=vRapportMaand)"},[Kalender.Maand]=

(Translations: maand=month jaar=Year)