Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

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
klagoudas
New Contributor III

Re: Greater and less than Filter Nprinting 17

Hi Matthieu,

I think this also answers your question..

Advanced Search filters in NPrinting 17.5

Best regards,

Kostas

b_knuever
Contributor III

Re: Greater and less than Filter Nprinting 17

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
Valued Contributor

Re: Greater and less than Filter Nprinting 17

Hi,

Could you create en example of this?

sureshqv
Esteemed Contributor III

Re: Greater and less than Filter Nprinting 17

create this as column in Qlik

and use that field as filter for report or task.

b_knuever
Contributor III

Re: Greater and less than Filter Nprinting 17

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)

Community Browser